@@ -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,110 @@ 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+ // ),
1195+ ),
1196+
1197+ Checkbox (
1198+ value: check,
1199+ onChanged: null ,
1200+ // (val){
1201+ // print('on change val $val');
1202+ // }
11741203 ),
11751204
1176- GFRadioButton (
1205+ GFCheckbox (
11771206 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 ' );
1207+ activebgColor: GFColors .DANGER ,
1208+ onChanged:
1209+ // null,
1210+ (val) {
1211+ setState (() {
1212+ check = val;
1213+ });
11871214 },
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:
1215+ value: check,
1216+ inactiveIcon: null ,
11961217 ),
11971218
1219+ // GFCheckbox(
1220+ // size: GFSize.SMALL,
1221+ // onChanged: (val) {
1222+ // print('on change val $val');
1223+ // },
1224+ // value: true,
1225+ // type: GFCheckboxType.circle,
1226+ // checkColor: GFColors.DANGER,
1227+ //// activebgColor: Colors.green,
1228+ //// inactivebgColor: Colors.white,
1229+ //// activeBorderColor: Colors.red,
1230+ // ),
1231+ //
1232+ // GFRadioButton(
1233+ // size: GFSize.SMALL,
1234+ // value: true,
1235+ // type: GFRadioButtonType.basic,
1236+ // radioColor: GFColors.SUCCESS,
1237+ //// activebgColor: GFColors.ALT,
1238+ //// inactivebgColor: GFColors.PRIMARY,
1239+ //// activeBorderColor: GFColors.DANGER,
1240+ //// inactiveBorderColor: GFColors.DARK,
1241+ // onChanged: (val) {
1242+ // print('on change val $val');
1243+ // },
1244+ // activeIcon: const Icon(
1245+ // Icons.check,
1246+ // size: 20,
1247+ // color: GFColors.DARK,
1248+ // ),
1249+ //// inactiveIcon: const Icon(Icons.close, size: 20, color: GFColors.DARK,),
1250+ //// custombgColor: GFColors.SUCCESS,
1251+ //// groupValue:
1252+ // ),
1253+
11981254// const Padding(
11991255// padding: EdgeInsets.only(left: 15, top: 30),
12001256// child: GFTypography(
@@ -1371,70 +1427,38 @@ class _MyHomePageState extends State<MyHomePage>
13711427// ],
13721428// ),
13731429// ),
1430+
13741431//
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- ),
14081432
14091433//
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- ),
1434+ // GFCarousel(
1435+ //// initialPage: 1,
1436+ // pagerSize: 12,
1437+ // activeIndicator: Colors.pink,
1438+ // passiveIndicator: Colors.pink.withOpacity(0.4),
1439+ // viewportFraction: 1.0,
1440+ //// aspectRatio: 1,
1441+ // autoPlay: true,
1442+ // enlargeMainPage: true,
1443+ // pagination: true,
1444+ // items: imageList
1445+ // .map((url) => Container(
1446+ // padding: const EdgeInsets.only(bottom: 16),
1447+ // margin: const EdgeInsets.all(12),
1448+ // child: ClipRRect(
1449+ // borderRadius:
1450+ // const BorderRadius.all(Radius.circular(5)),
1451+ // child: Image.network(url,
1452+ // fit: BoxFit.cover, width: 1000),
1453+ // ),
1454+ // ))
1455+ // .toList(),
1456+ //// onPageChanged: (int index) {
1457+ //// setState(() {
1458+ //// index;
1459+ //// });
1460+ //// },
1461+ // ),
14381462
14391463//
14401464// GFCarousel(
@@ -1674,14 +1698,14 @@ class _MyHomePageState extends State<MyHomePage>
16741698// borderRadius: BorderRadius.circular(10.0),
16751699// ),
16761700
1677- const GFIconBadge (
1678- child: GFAvatar (
1679- backgroundColor: GFColors .SUCCESS ,
1680- ),
1681- counterChild: GFBadge (
1682- text: '12' ,
1683- ),
1684- ),
1701+ // const GFIconBadge(
1702+ // child: GFAvatar(
1703+ // backgroundColor: GFColors.SUCCESS,
1704+ // ),
1705+ // counterChild: GFBadge(
1706+ // text: '12',
1707+ // ),
1708+ // ),
16851709
16861710// GFIconButton(
16871711// onPressed: () {},
0 commit comments