@@ -5,7 +5,7 @@ import 'package:get/get.dart';
55import 'package:get_storage/get_storage.dart' ;
66import '../../CONSTANTS.dart' ;
77import '../../utils/cupertinoSwitchListTile.dart' ;
8- import '../../utils/navigator_pop .dart' ;
8+ import '../../utils/custom_navigator_pop .dart' ;
99
1010class NotificationPageSetting extends StatefulWidget {
1111 const NotificationPageSetting ({Key key}) : super (key: key);
@@ -15,95 +15,16 @@ class NotificationPageSetting extends StatefulWidget {
1515}
1616
1717class _NotificationPageSettingState extends State <NotificationPageSetting > {
18- var prayerNotification = [true , true , true , true , true , true , true ];
19- bool isAnythingChanged = false ; //effect the button
20-
2118 @override
2219 Widget build (BuildContext context) {
2320 return Scaffold (
2421 appBar: AppBar (
2522 title: const Text ('Notification' ),
2623 centerTitle: true ,
27- // actions: [
28- // FlatButton(
29- // shape: CircleBorder(side: BorderSide(color: Colors.transparent)),
30- // textColor: Colors.white,
31- // onPressed: !isAnythingChanged
32- // ? null
33- // : () {
34- // print('Save button clicked');
35- // print(prayerNotification);
36- // Navigator.pop(context);
37- // },
38- // child: Text(
39- // 'SAVE',
40- // ),
41- // )
42- // ],
4324 ),
4425 body: ListView (
4526 padding: const EdgeInsets .all (16 ),
4627 children: [
47- //Turned of for a while
48- // Text('Basic'),
49- // Card(
50- // child: Column(children: [
51- // CupertinoSwitchListTile(
52- // title: Text(PrayerName.prayerName[0]),
53- // value: prayerNotification[0],
54- // onChanged: (bool value) {
55- // setState(() {
56- // isAnythingChanged = true;
57- // prayerNotification[0] = value;
58- // });
59- // }),
60- // CupertinoSwitchListTile(
61- // title: Text(PrayerName.prayerName[1]),
62- // value: prayerNotification[1],
63- // onChanged: (bool value) {
64- // setState(() {
65- // isAnythingChanged = true;
66- // prayerNotification[1] = value;
67- // });
68- // }),
69- // CupertinoSwitchListTile(
70- // title: Text(PrayerName.prayerName[2]),
71- // value: prayerNotification[2],
72- // onChanged: (bool value) {
73- // setState(() {
74- // isAnythingChanged = true;
75- // prayerNotification[2] = value;
76- // });
77- // }),
78- // CupertinoSwitchListTile(
79- // title: Text(PrayerName.prayerName[3]),
80- // value: prayerNotification[3],
81- // onChanged: (bool value) {
82- // setState(() {
83- // isAnythingChanged = true;
84- // prayerNotification[3] = value;
85- // });
86- // }),
87- // CupertinoSwitchListTile(
88- // title: Text(PrayerName.prayerName[4]),
89- // value: prayerNotification[4],
90- // onChanged: (bool value) {
91- // setState(() {
92- // isAnythingChanged = true;
93- // prayerNotification[4] = value;
94- // });
95- // }),
96- // CupertinoSwitchListTile(
97- // title: Text(PrayerName.prayerName[5]),
98- // value: prayerNotification[5],
99- // onChanged: (bool value) {
100- // setState(() {
101- // isAnythingChanged = true;
102- // prayerNotification[5] = value;
103- // });
104- // }),
105- // ]),
106- // ),
10728 const Padding (padding: EdgeInsets .all (8.0 ), child: Text ('Basic' )),
10829 Card (
10930 child: ListTile (
@@ -120,7 +41,6 @@ class _NotificationPageSettingState extends State<NotificationPageSetting> {
12041 ),
12142 const Padding (
12243 padding: EdgeInsets .all (8.0 ), child: Text ('Troubleshooting' )),
123-
12444 Card (
12545 child: Container (
12646 padding: const EdgeInsets .symmetric (vertical: 8.0 ),
@@ -130,7 +50,6 @@ class _NotificationPageSettingState extends State<NotificationPageSetting> {
13050 'Enable if you experiencing an extreme slowdown in app. Notification will schedule weekly basis. Default is OFF (monthly).' ),
13151 value: GetStorage ().read (kStoredNotificationLimit),
13252 onChanged: (value) {
133- // print(value);
13453 setState (() {
13554 GetStorage ().write (kStoredNotificationLimit, value);
13655 });
0 commit comments