import 'package:betting/commom/utils/color_utils.dart';
import 'package:betting/routes/app_pages.dart';
import 'package:betting/view/mobile/home_page/setting_notify/category/category_controller.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import 'in_app_notfication_controller.dart';


class InAppNotificationsPage extends GetView<InAppNotificationsController> {
  @override
  final controller = Get.put(InAppNotificationsController());



  @override
  Widget build(BuildContext context) {
    return  GetBuilder<InAppNotificationsController>(builder: (controller) {
      return Stack(
        children: [
          Image.asset(
            "assets/images/background_app_betting.jpg",
            height: MediaQuery.of(context).size.height,
            width: MediaQuery.of(context).size.width,
            fit: BoxFit.cover,
          ),
          Scaffold(
            appBar: AppBar(
              backgroundColor: Colors.transparent,
              bottom: const PreferredSize(preferredSize: Size(double.infinity, 1), child: Divider(color: Colors.white,)),
              title: const Text("In-App Notifications",style: TextStyle(color: Colors.white),),
              centerTitle: true,
            ),
            backgroundColor: Colors.transparent,
            resizeToAvoidBottomInset: true,
            body: Container(
                margin: EdgeInsets.only(bottom: 24.h,right: 16.w,left: 16.w),
                child:Column(
                  children: [
                    Row(
                      children: [
                        SizedBox(width: 8.w,),
                        Text('Favourites Match Confirmation', style: TextStyle(color: Colors.white, fontSize: 14.sp, fontWeight: FontWeight.w400),),
                        const Spacer(),
                        Obx(() =>
                            SizedBox(
                              child:
                              Transform.scale(scale: 0.6, child: CupertinoSwitch(
                                  activeColor: ColorUtils.PRIMARY_COLOR,
                                  value: controller.isShowFavourites.value,
                                  onChanged:(value){
                                    controller.isShowFavourites.value =! controller.isShowFavourites.value;
                                  }),),
                            )
                        )
                      ],
                    ),
                    SizedBox(height: 8.h,),
                    Row(
                      children: [
                        SizedBox(width: 8.w,),
                        Text('Favourites Language Confirmation', style: TextStyle(color: Colors.white, fontSize: 14.sp, fontWeight: FontWeight.w400),),
                        const Spacer(),
                        Obx(() =>
                            SizedBox(
                              child:
                              Transform.scale(scale: 0.6, child: CupertinoSwitch(
                                  activeColor: ColorUtils.PRIMARY_COLOR,
                                  value: controller.isShowFavourites.value,
                                  onChanged:(value){
                                    controller.isShowFavourites.value =! controller.isShowFavourites.value;
                                  }),),
                            )
                        )
                      ],
                    ),
                  ],
                )
            ),
          )
        ],
      );
    },);
  }
}
