import 'package:betting/commom/widget/cache_network_custom.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import 'detail_regions/detail_regions_page.dart';
import 'list_regions_controller.dart';


class ListRegionsPage extends GetWidget<ListRegionsController>{
  final controller = Get.put(ListRegionsController());

  @override
  Widget build(BuildContext context) {
  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(
         backgroundColor: Colors.transparent,
         appBar: AppBar(
           automaticallyImplyLeading: false,
           leading:InkWell(
             onTap: (){
               Get.back();
             },
             child:   const Icon(CupertinoIcons.back, color: Colors.white,),
           ),
           title: Text('England', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 16.sp),),
           backgroundColor: Colors.transparent,
           centerTitle: true,
         ),
         body:SingleChildScrollView(
           child:  Container(
             margin: const EdgeInsets.symmetric(horizontal: 16),
             child:Column(
               children: [
                 const Divider(),
                 ListView.builder(
                     physics: const NeverScrollableScrollPhysics(),
                     itemCount: 16,
                     shrinkWrap: true,
                     itemBuilder: (context, index){
                       return Container(
                         margin:  EdgeInsets.only(top: 4.h),
                         decoration: BoxDecoration(
                             borderRadius: BorderRadius.circular(8),
                             color:Colors.white10
                         ),
                         padding:  EdgeInsets.all(8.w),
                         child:
                        InkWell(
                          onTap: (){
                            Get.to(DetailRegionsPage());
                          },
                          child:  Row(
                            children: [
                              const SizedBox(
                                  width: 24,
                                  height: 24,
                                  child: CacheNetWorkCustom(urlImage: 'https://upload.wikimedia.org/wikipedia/vi/thumb/5/5c/Chelsea_crest.svg/1200px-Chelsea_crest.svg.png')
                              ),
                               SizedBox(width: 6.w,),
                              Text('chon xanh le', style: TextStyle(color: Colors.white, fontSize: 14.sp, fontWeight: FontWeight.w500),)
                            ],
                          ),
                        ),
                       );

                     })
               ],
             ),
           ),
         ),
       )
     ],
   );
  }
  
}