@@ -40,6 +40,7 @@ class _MyHomePageState extends State<MyHomePage>
4040 with SingleTickerProviderStateMixin {
4141 TabController tabController;
4242 final _ratingController = TextEditingController ();
43+ bool check = false ;
4344
4445 @override
4546 void initState () {
@@ -1146,55 +1147,112 @@ class _MyHomePageState extends State<MyHomePage>
11461147// .toList(),
11471148// ),
11481149
1149- // Container(
1150- // alignment: Alignment.center,
1151- // child: GFCheckbox(
1152- // size: GFSize.SMALL,
1153- // onChanged: (val) {
1154- // print('on change val $val');
1155- // },
1156- // value: true,
1157- // type: GFCheckboxType.circle,
1158- //// checkColor: GFColors.DANGER,
1159- ////activebgColor: Colors.green,
1160- ////inactivebgColor: Colors.white,
1161- ////activeBorderColor: Colors.red,
1162- //// backgroundColor: Colors.green,
1163- // ),
1164- // ),
1150+ CheckboxListTile (
1151+ title: Text ("title text" ),
1152+ value: check,
1153+ onChanged: (newValue) {
1154+ setState (() {
1155+ check = newValue;
1156+ });
1157+ },
1158+ controlAffinity: ListTileControlAffinity .leading,
1159+ ),
11651160
1166- GFCheckbox (
1167- size: GFSize .SMALL ,
1168- activebgColor: GFColors .DANGER ,
1161+ GFCheckboxListTile (
1162+ color: Colors .blueGrey.withOpacity (0.3 ),
1163+ title: const Text ('title' ),
1164+ subTitle: const Text ('subtitle' ),
1165+ // avatar: const GFAvatar(
1166+ // backgroundColor: GFColors.SUCCESS,
1167+ // ),
1168+ description: const Text ('description' ),
1169+ // padding: const EdgeInsets.all(16),
1170+ // margin: const EdgeInsets.all(16),
1171+ // size: 24,
1172+ // type: GFCheckboxType.basic,
1173+ // checkColor: Colors.white,
1174+ // activebgColor: Colors.red,
1175+ // inactivebgColor: Colors.red.withOpacity(0.3),
1176+ // activeBorderColor: Colors.red,
1177+ // inactiveBorderColor: Colors.red.withOpacity(0.3),
1178+ // custombgColor: GFColors.SUCCESS,
1179+ value: check,
11691180 onChanged: (val) {
1170- print ('on change val $val ' );
1181+ setState (() {
1182+ check = val;
1183+ });
11711184 },
1172- value: true ,
1173- inactiveIcon: null ,
1185+ // inactiveIcon: const Icon(
1186+ // Icons.close,
1187+ // color: GFColors.DARK,
1188+ // size: 16,
1189+ // ),
1190+ // activeIcon: const Icon(
1191+ // Icons.check,
1192+ // size: 20,
1193+ // color: GFColors.WHITE,
1194+ // ),
11741195 ),
11751196
1176- GFRadioButton (
1197+ Checkbox (
1198+ value: check,
1199+ onChanged: null ,
1200+ // (val){
1201+ // print('on change val $val');
1202+ // }
1203+ ),
1204+
1205+
1206+
1207+ GFCheckbox (
11771208 size: GFSize .SMALL ,
1178- value: true ,
1179- type: GFRadioButtonType .basic,
1180- radioColor: GFColors .SUCCESS ,
1181- // activebgColor: GFColors.ALT,
1182- // inactivebgColor: GFColors.PRIMARY,
1183- // activeBorderColor: GFColors.DANGER,
1184- // inactiveBorderColor: GFColors.DARK,
1185- onChanged: (val) {
1186- print ('on change val $val ' );
1209+ activebgColor: GFColors .DANGER ,
1210+ onChanged:
1211+ // null,
1212+ (val) {
1213+ setState (() {
1214+ check = val;
1215+ });
11871216 },
1188- activeIcon: const Icon (
1189- Icons .check,
1190- size: 20 ,
1191- color: GFColors .DARK ,
1192- ),
1193- // inactiveIcon: const Icon(Icons.close, size: 20, color: GFColors.DARK,),
1194- // custombgColor: GFColors.SUCCESS,
1195- // groupValue:
1217+ value: check,
1218+ inactiveIcon: null ,
11961219 ),
11971220
1221+ // GFCheckbox(
1222+ // size: GFSize.SMALL,
1223+ // onChanged: (val) {
1224+ // print('on change val $val');
1225+ // },
1226+ // value: true,
1227+ // type: GFCheckboxType.circle,
1228+ // checkColor: GFColors.DANGER,
1229+ //// activebgColor: Colors.green,
1230+ //// inactivebgColor: Colors.white,
1231+ //// activeBorderColor: Colors.red,
1232+ // ),
1233+ //
1234+ // GFRadioButton(
1235+ // size: GFSize.SMALL,
1236+ // value: true,
1237+ // type: GFRadioButtonType.basic,
1238+ // radioColor: GFColors.SUCCESS,
1239+ //// activebgColor: GFColors.ALT,
1240+ //// inactivebgColor: GFColors.PRIMARY,
1241+ //// activeBorderColor: GFColors.DANGER,
1242+ //// inactiveBorderColor: GFColors.DARK,
1243+ // onChanged: (val) {
1244+ // print('on change val $val');
1245+ // },
1246+ // activeIcon: const Icon(
1247+ // Icons.check,
1248+ // size: 20,
1249+ // color: GFColors.DARK,
1250+ // ),
1251+ //// inactiveIcon: const Icon(Icons.close, size: 20, color: GFColors.DARK,),
1252+ //// custombgColor: GFColors.SUCCESS,
1253+ //// groupValue:
1254+ // ),
1255+
11981256// const Padding(
11991257// padding: EdgeInsets.only(left: 15, top: 30),
12001258// child: GFTypography(
@@ -1371,70 +1429,39 @@ class _MyHomePageState extends State<MyHomePage>
13711429// ],
13721430// ),
13731431// ),
1432+
13741433//
1375- GFCheckboxListTile (
1376- color: GFColors .ALT ,
1377- title: const Text ('title' ),
1378- subTitle: const Text ('subtitle' ),
1379- // titleText: 'sdfg',
1380- // subtitleText: 'sdfg',
1381- avatar: const GFAvatar (
1382- backgroundColor: GFColors .SUCCESS ,
1383- ),
1384- description: const Text ('description' ),
1385- padding: const EdgeInsets .all (16 ),
1386- margin: const EdgeInsets .all (16 ),
1387- size: 24 ,
1388- type: GFCheckboxType .basic,
1389- checkColor: GFColors .WHITE ,
1390- activebgColor: GFColors .PRIMARY ,
1391- inactivebgColor: GFColors .WHITE ,
1392- activeBorderColor: GFColors .WHITE ,
1393- inactiveBorderColor: GFColors .DARK ,
1394- activeIcon: const Icon (
1395- Icons .check,
1396- size: 20 ,
1397- color: GFColors .WHITE ,
1398- ),
1399- custombgColor: GFColors .SUCCESS ,
1400- onChanged: (val) {},
1401- value: true ,
1402- inactiveIcon: const Icon (
1403- Icons .close,
1404- color: GFColors .DARK ,
1405- size: 16 ,
1406- ),
1407- ),
1434+
14081435
14091436//
1410- GFCarousel (
1411- // initialPage: 1,
1412- pagerSize: 12 ,
1413- activeIndicator: Colors .pink,
1414- passiveIndicator: Colors .pink.withOpacity (0.4 ),
1415- viewportFraction: 1.0 ,
1416- // aspectRatio: 1,
1417- autoPlay: true ,
1418- enlargeMainPage: true ,
1419- pagination: true ,
1420- items: imageList
1421- .map ((url) => Container (
1422- padding: const EdgeInsets .only (bottom: 16 ),
1423- margin: const EdgeInsets .all (12 ),
1424- child: ClipRRect (
1425- borderRadius:
1426- const BorderRadius .all (Radius .circular (5 )),
1427- child: Image .network (url,
1428- fit: BoxFit .cover, width: 1000 ),
1429- ),
1430- ))
1431- .toList (),
1432- // onPageChanged: (int index) {
1433- // setState(() {
1434- // index;
1435- // });
1436- // },
1437- ),
1437+ // GFCarousel(
1438+ //// initialPage: 1,
1439+ // pagerSize: 12,
1440+ // activeIndicator: Colors.pink,
1441+ // passiveIndicator: Colors.pink.withOpacity(0.4),
1442+ // viewportFraction: 1.0,
1443+ //// aspectRatio: 1,
1444+ // autoPlay: true,
1445+ // enlargeMainPage: true,
1446+ // pagination: true,
1447+ // items: imageList
1448+ // .map((url) => Container(
1449+ // padding: const EdgeInsets.only(bottom: 16),
1450+ // margin: const EdgeInsets.all(12),
1451+ // child: ClipRRect(
1452+ // borderRadius:
1453+ // const BorderRadius.all(Radius.circular(5)),
1454+ // child: Image.network(url,
1455+ // fit: BoxFit.cover, width: 1000),
1456+ // ),
1457+ // ))
1458+ // .toList(),
1459+ //// onPageChanged: (int index) {
1460+ //// setState(() {
1461+ //// index;
1462+ //// });
1463+ //// },
1464+ // ),
14381465
14391466//
14401467// GFCarousel(
@@ -1674,14 +1701,14 @@ class _MyHomePageState extends State<MyHomePage>
16741701// borderRadius: BorderRadius.circular(10.0),
16751702// ),
16761703
1677- const GFIconBadge (
1678- child: GFAvatar (
1679- backgroundColor: GFColors .SUCCESS ,
1680- ),
1681- counterChild: GFBadge (
1682- text: '12' ,
1683- ),
1684- ),
1704+ // const GFIconBadge(
1705+ // child: GFAvatar(
1706+ // backgroundColor: GFColors.SUCCESS,
1707+ // ),
1708+ // counterChild: GFBadge(
1709+ // text: '12',
1710+ // ),
1711+ // ),
16851712
16861713// GFIconButton(
16871714// onPressed: () {},
0 commit comments