part of ad;

class AdPage extends StatefulWidget {
  const AdPage({Key? key}) : super(key: key);

  @override
  State<AdPage> createState() => _AdPageState();
}

class _AdPageState extends State<AdPage> {
  @override
  Widget build(BuildContext context) {
    return GetBuilder<AdController>(
        init: AdController(context),
        builder:(controller) => Scaffold(
          body: Stack(
            fit: StackFit.expand,
            children: [
              Container(
                color: Colors.green,
              ),
              Positioned(
                top: 40.w,
                right: 20.w,
                child: GestureDetector(
                  onTap: (){
                    context.goNamed(Routes.main);
                  },
                  child: Container(
                    padding: EdgeInsets.symmetric(horizontal: 12.0.w, vertical: 8.0.w),
                    decoration: BoxDecoration(
                      color: Colors.black.withOpacity(0.6),
                      borderRadius: BorderRadius.circular(8.0.w),
                    ),
                    child: Text(
                      '跳过 ${controller._countdown} s',
                      style: const TextStyle(color: Colors.white),
                    ),
                  ),
                )
              )
            ],
          )
        )

    );
  }
}
