Bladeren bron

Update 2402 13:43

dienianindya 1 jaar geleden
bovenliggende
commit
17f88a3408

+ 4
- 0
android/app/src/main/AndroidManifest.xml Bestand weergeven

@@ -33,6 +33,10 @@
33 33
             <meta-data
34 34
                 android:name="io.flutter.embedding.android.NormalTheme"
35 35
                 android:resource="@style/NormalTheme" />
36
+            <intent-filter>
37
+                <action android:name="FLUTTER_NOTIFICATION_CLICK"/>
38
+                <category android:name="android.intent.category.DEFAULT"/>
39
+            </intent-filter>
36 40
             <intent-filter>
37 41
                 <action android:name="android.intent.action.MAIN" />
38 42
                 <category android:name="android.intent.category.LAUNCHER" />

+ 1
- 0
assets/animation/animation_no_internet_2.json
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 1
- 0
assets/animation/animation_no_internet_3.json
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 1
- 0
assets/animation/animation_no_internet_4.json
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 1
- 0
assets/animation/animation_no_internet_5.json
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 0
- 100
lib/Screens/CheckInternetConnection/CheckInternetConnection.dart Bestand weergeven

@@ -1,100 +0,0 @@
1
-import 'dart:async';
2
-import 'dart:developer' as developer;
3
-
4
-import 'package:connectivity_plus/connectivity_plus.dart';
5
-import 'package:flutter/material.dart';
6
-import 'package:flutter/services.dart';
7
-import 'package:google_fonts/google_fonts.dart';
8
-import 'package:lottie/lottie.dart';
9
-
10
-class MyHomePage extends StatefulWidget {
11
-  @override
12
-  State<MyHomePage> createState() => _MyHomePageState();
13
-}
14
-
15
-class _MyHomePageState extends State<MyHomePage> {
16
-  ConnectivityResult _connectionStatus = ConnectivityResult.none;
17
-  final Connectivity _connectivity = Connectivity();
18
-  late StreamSubscription<ConnectivityResult> _connectivitySubscription;
19
-
20
-  @override
21
-  void initState() {
22
-    super.initState();
23
-    initConnectivity();
24
-
25
-    _connectivitySubscription = _connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
26
-  }
27
-
28
-  @override
29
-  void dispose() {
30
-    _connectivitySubscription.cancel();
31
-    super.dispose();
32
-  }
33
-
34
-  // Platform messages are asynchronous, so we initialize in an async method.
35
-  Future<void> initConnectivity() async {
36
-    late ConnectivityResult result;
37
-    // Platform messages may fail, so we use a try/catch PlatformException.
38
-    try {
39
-      result = await _connectivity.checkConnectivity();
40
-    } on PlatformException catch (e) {
41
-      developer.log('Couldn\'t check connectivity status', error: e);
42
-      return;
43
-    }
44
-
45
-    // If the widget was removed from the tree while the asynchronous platform
46
-    // message was in flight, we want to discard the reply rather than calling
47
-    // setState to update our non-existent appearance.
48
-    if (!mounted) {
49
-      return Future.value(null);
50
-    }
51
-
52
-    return _updateConnectionStatus(result);
53
-  }
54
-
55
-  Future<void> _updateConnectionStatus(ConnectivityResult result) async {
56
-    setState(() {
57
-      _connectionStatus = result;
58
-    });
59
-  }
60
-
61
-  @override
62
-  Widget build(BuildContext context) {
63
-    return Container(
64
-      child: Column(
65
-        children: [
66
-          SizedBox(
67
-            width: 250,
68
-            height: 250,
69
-            child: LottieBuilder.asset(
70
-                'assets/animation/animation_no_internet.json',
71
-                repeat: true),
72
-          ),
73
-          Text(
74
-            "No Internet Connection",
75
-            style: GoogleFonts.josefinSans(fontSize: 18),
76
-          ),
77
-          Padding(
78
-            padding: EdgeInsets.all(15),
79
-            child: Text(
80
-              'You Are Not Connected to The Internet. Please check your Wifi or Mobile Data!',
81
-              style: GoogleFonts.zillaSlab(fontSize: 16),
82
-            ),
83
-          ),
84
-          ElevatedButton(
85
-              onPressed: (){
86
-
87
-              },
88
-              child: Text("Retry",
89
-                  textAlign: TextAlign.center,
90
-                  style: TextStyle(
91
-                      color: Colors.white,
92
-                      fontSize: 17,
93
-                      fontWeight: FontWeight.w500)
94
-              )
95
-          )
96
-        ],
97
-      ),
98
-    );
99
-  }
100
-}

+ 0
- 21
lib/Screens/CheckInternetConnection/ConnectivityProvider.dart Bestand weergeven

@@ -1,21 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-
3
-class ConnectivityProvider with ChangeNotifier{
4
-  /*Connectivity
5
-  ConnectivityProvider _connectivityProvider = new ConnectivityProvider();
6
-
7
-  late bool _isOnline;
8
-  bool get isOnline => _isOnline;
9
-
10
-  startMonitoring() async {
11
-
12
-  }
13
-
14
-  Future<void> initConnectivity() async {
15
-    try {
16
-      var connectivityResult = await (Connectivity().checkConnectivity());
17
-    } catch {
18
-
19
-    }
20
-  }*/
21
-}

+ 0
- 40
lib/Screens/CheckInternetConnection/NoInternetConnection.dart Bestand weergeven

@@ -1,40 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-import 'package:google_fonts/google_fonts.dart';
3
-import 'package:lottie/lottie.dart';
4
-
5
-class NoInternetConnection extends StatefulWidget {
6
-  const NoInternetConnection({Key? key}) : super(key: key);
7
-
8
-  @override
9
-  State<NoInternetConnection> createState() => _NoInternetConnectionState();
10
-}
11
-
12
-class _NoInternetConnectionState extends State<NoInternetConnection> {
13
-  @override
14
-  Widget build(BuildContext context) {
15
-    return Container(
16
-      child: Column(
17
-        children: [
18
-          SizedBox(
19
-            width: 250,
20
-            height: 250,
21
-            child: LottieBuilder.asset(
22
-                'assets/animation/animation_no_internet.json',
23
-                repeat: true),
24
-          ),
25
-          Text(
26
-            "No Internet Connection",
27
-            style: GoogleFonts.josefinSans(fontSize: 18),
28
-          ),
29
-          Padding(
30
-            padding: EdgeInsets.all(15),
31
-            child: Text(
32
-              'You Are Not Connected to The Internet. Please check your Wifi or Mobile Data!',
33
-              style: GoogleFonts.zillaSlab(fontSize: 16),
34
-            ),
35
-          ),
36
-        ],
37
-      ),
38
-    );
39
-  }
40
-}

+ 4
- 1
lib/Screens/ForgotPassword/forgotPassword_screen.dart Bestand weergeven

@@ -146,7 +146,7 @@ class ForgotPasswordScreen extends StatelessWidget {
146 146
                                       AlertDialog alert = AlertDialog(
147 147
                                         title: Text("Employee Self Service"),
148 148
                                         //content: Text(message),
149
-                                        content: Text("Link for reset password has been sent to your email address"),
149
+                                        content: Text("Link to reset password has been sent to your email address"),
150 150
                                         actions: [
151 151
                                           okButton,
152 152
                                         ],
@@ -154,6 +154,7 @@ class ForgotPasswordScreen extends StatelessWidget {
154 154
                                       // show the dialog
155 155
                                       showDialog(
156 156
                                         context: context,
157
+                                        barrierDismissible: false,
157 158
                                         builder: (BuildContext context) {
158 159
                                           return alert;
159 160
                                         },
@@ -179,6 +180,7 @@ class ForgotPasswordScreen extends StatelessWidget {
179 180
                                       // show the dialog
180 181
                                       showDialog(
181 182
                                         context: context,
183
+                                        barrierDismissible: false,
182 184
                                         builder: (BuildContext context) {
183 185
                                           return alert;
184 186
                                         },
@@ -292,6 +294,7 @@ showAlertDialog(BuildContext context) {
292 294
   // show the dialog
293 295
   showDialog(
294 296
     context: context,
297
+    barrierDismissible: false,
295 298
     builder: (BuildContext context) {
296 299
       return alert;
297 300
     },

+ 73
- 88
lib/Screens/Home/home_screen.dart Bestand weergeven

@@ -1,7 +1,10 @@
1
+import 'dart:async';
1 2
 import 'dart:convert';
2 3
 import 'dart:typed_data';
3 4
 
5
+import 'package:connectivity_plus/connectivity_plus.dart';
4 6
 import 'package:double_back_to_close/double_back_to_close.dart';
7
+import 'package:flutter/cupertino.dart';
5 8
 import 'package:flutter/material.dart';
6 9
 import 'package:fluttertoast/fluttertoast.dart';
7 10
 import 'package:focus_detector/focus_detector.dart';
@@ -13,11 +16,13 @@ import 'package:hris_selfservice_mobile/Screens/Menu/Reimburse/reimburse_screen.
13 16
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/slipgaji_screen.dart';
14 17
 import 'package:hris_selfservice_mobile/Screens/Menu/SuratTugas/surattugas_screen.dart';
15 18
 import 'package:hris_selfservice_mobile/Screens/Settings/settings_screen.dart';
19
+import 'package:lottie/lottie.dart';
16 20
 import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
17 21
 import 'package:shared_preferences/shared_preferences.dart';
18 22
 import 'dart:developer' as logDev;
19 23
 import '../Settings/RequestHttp/getDetail_post.dart';
20 24
 import '../Settings/RequestHttp/getProfileImage_post.dart';
25
+import 'package:internet_connection_checker/internet_connection_checker.dart';
21 26
 
22 27
 var _imageToShow;
23 28
 late String nameShared;
@@ -36,44 +41,44 @@ class HomeView extends StatefulWidget {
36 41
 }
37 42
 
38 43
 class _HomeView extends State<HomeView> {
44
+  late StreamSubscription subscription;
45
+  bool isDeviceConnected = false;
46
+  bool isAlertSet = false;
47
+
39 48
   @override
40 49
   initState() {
50
+    getConnectivity();
41 51
     getDetail();
42 52
     _imageToShow = AssetImage('assets/images/ic_administrator.png');
43
-    /*WidgetsBinding.instance.addPostFrameCallback((_) async {
44
-      ProgressDialog loading = ProgressDialog(context);
45
-      loading = ProgressDialog(context,
46
-          type: ProgressDialogType.normal,
47
-          isDismissible: false,
48
-          showLogs: true);
49
-      loading.style(
50
-          message: 'Please Wait .....',
51
-          borderRadius: 5,
52
-          backgroundColor: Colors.white,
53
-          progressWidget: CircularProgressIndicator(),
54
-          elevation: 10.0,
55
-          padding: EdgeInsets.all(10),
56
-          insetAnimCurve: Curves.easeInOut,
57
-          progress: 0.0,
58
-          maxProgress: 100.0,
59
-          progressTextStyle: TextStyle(
60
-              color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
61
-          messageTextStyle: TextStyle(
62
-              color: Colors.black,
63
-              fontSize: 15.0,
64
-              fontWeight: FontWeight.w600));
65
-      loading.show();
66
-      _imageToShow = getProfileImage();
67
-    });*/
53
+    WidgetsBinding.instance.addPostFrameCallback((_) async {
54
+      getProfileImage();
55
+    });
68 56
     super.initState();
69 57
   }
70 58
 
59
+  getConnectivity() =>
60
+      subscription = Connectivity().onConnectivityChanged.listen(
61
+            (ConnectivityResult result) async {
62
+          isDeviceConnected = await InternetConnectionChecker().hasConnection;
63
+          if (!isDeviceConnected && isAlertSet == false) {
64
+            showDialogBox();
65
+            setState(() => isAlertSet = true);
66
+          }
67
+        },
68
+      );
69
+
70
+  @override
71
+  void dispose() {
72
+    subscription.cancel();
73
+    super.dispose();
74
+  }
75
+
71 76
   //Get Profile image
72 77
   getProfileImage() async {
73 78
     final SharedPreferences prefs = await SharedPreferences.getInstance();
74 79
     final session = prefs.getString('session');
75 80
 
76
-    /*ProgressDialog loading = ProgressDialog(context);
81
+    ProgressDialog loading = ProgressDialog(context);
77 82
     loading = ProgressDialog(context,
78 83
         type: ProgressDialogType.normal,
79 84
         isDismissible: false,
@@ -93,7 +98,9 @@ class _HomeView extends State<HomeView> {
93 98
         messageTextStyle: TextStyle(
94 99
             color: Colors.black,
95 100
             fontSize: 15.0,
96
-            fontWeight: FontWeight.w600));*/
101
+            fontWeight: FontWeight.w600));
102
+
103
+    loading.show();
97 104
 
98 105
     GetProfileImage_Post.connectToAPI(session!).then((valueResult) async {
99 106
       Map<String, dynamic> object = json.decode(valueResult);
@@ -108,14 +115,13 @@ class _HomeView extends State<HomeView> {
108 115
             });
109 116
           } else if (photo != "false") {
110 117
             Uint8List decodedBytes = Base64Decoder().convert(photo);
111
-            //logDev.log(decodedBytes.toString(), name: "DECODED BYTES photo");
112 118
             setState(() {
113 119
               _imageToShow = Image
114 120
                   .memory(decodedBytes, gaplessPlayback: true)
115 121
                   .image;
116 122
             });
117 123
           }
118
-          //loading.hide();
124
+          loading.hide();
119 125
         } else if (status == "failed") {
120 126
           String message = object['result']['message'].toString();
121 127
           Fluttertoast.showToast(
@@ -126,7 +132,7 @@ class _HomeView extends State<HomeView> {
126 132
               textColor: Colors.white,
127 133
               fontSize: 16.0);
128 134
         }
129
-        //loading.hide();
135
+        loading.hide();
130 136
       } else {
131 137
         Fluttertoast.showToast(
132 138
             msg: "Server Response Error",
@@ -135,7 +141,7 @@ class _HomeView extends State<HomeView> {
135 141
             timeInSecForIosWeb: 1,
136 142
             textColor: Colors.white,
137 143
             fontSize: 16.0);
138
-        //loading.hide();
144
+        loading.hide();
139 145
       }
140 146
     });
141 147
     return _imageToShow;
@@ -143,9 +149,7 @@ class _HomeView extends State<HomeView> {
143 149
 
144 150
   //GetDetail
145 151
   getDetail() async {
146
-    final SharedPreferences prefs = await SharedPreferences.getInstance();
147
-    final session = prefs.getString('session');
148
-    GetDetail_Post.connectToAPI(session!).then((valueResult) async {
152
+    GetDetail_Post.connectToAPI().then((valueResult) async {
149 153
       Map<String, dynamic> object = json.decode(valueResult);
150 154
       if (object.containsKey("result").toString() == "true") {
151 155
         statusDetail = object['result']['status'].toString();
@@ -207,6 +211,40 @@ class _HomeView extends State<HomeView> {
207 211
       ),
208 212
     );
209 213
   }
214
+
215
+  showDialogBox() => showCupertinoDialog<String>(
216
+    context: context,
217
+    builder: (BuildContext context) => CupertinoAlertDialog(
218
+      title: const Text('No Connection'),
219
+      content: const Text('Please check your internet connectivity'),
220
+      actions: <Widget>[
221
+        Column(
222
+          children: [
223
+            SizedBox(
224
+              width: 250,
225
+              height: 250,
226
+              child: LottieBuilder.asset(
227
+                  //'assets/animation/animation_no_internet.json',
228
+                  'assets/animation/animation_no_internet_3.json',
229
+                  repeat: true),
230
+            ),
231
+          ],
232
+        ),
233
+        TextButton(
234
+          onPressed: () async {
235
+            Navigator.pop(context, 'Cancel');
236
+            setState(() => isAlertSet = false);
237
+            isDeviceConnected = await InternetConnectionChecker().hasConnection;
238
+            if (!isDeviceConnected && isAlertSet == false) {
239
+              showDialogBox();
240
+              setState(() => isAlertSet = true);
241
+            }
242
+          },
243
+          child: const Text('Retry'),
244
+        ),
245
+      ],
246
+    ),
247
+  );
210 248
 }
211 249
 
212 250
 class HomeScreen extends StatefulWidget {
@@ -220,29 +258,6 @@ class _HomeScreenState extends State<HomeScreen> {
220 258
     final SharedPreferences prefs = await SharedPreferences.getInstance();
221 259
     final session = prefs.getString('session');
222 260
 
223
-    /*ProgressDialog loading = ProgressDialog(context);
224
-    loading = ProgressDialog(context,
225
-        type: ProgressDialogType.normal,
226
-        isDismissible: false,
227
-        showLogs: true);
228
-    loading.style(
229
-        message: 'Please Wait .....',
230
-        borderRadius: 5,
231
-        backgroundColor: Colors.white,
232
-        progressWidget: CircularProgressIndicator(),
233
-        elevation: 10.0,
234
-        padding: EdgeInsets.all(10),
235
-        insetAnimCurve: Curves.easeInOut,
236
-        progress: 0.0,
237
-        maxProgress: 100.0,
238
-        progressTextStyle: TextStyle(
239
-            color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
240
-        messageTextStyle: TextStyle(
241
-            color: Colors.black,
242
-            fontSize: 15.0,
243
-            fontWeight: FontWeight.w600));
244
-
245
-    loading.show();*/
246 261
     GetProfileImage_Post.connectToAPI(session!).then((valueResult) async {
247 262
       Map<String, dynamic> object = json.decode(valueResult);
248 263
       if (object.containsKey("result").toString() == "true") {
@@ -258,9 +273,7 @@ class _HomeScreenState extends State<HomeScreen> {
258 273
             Uint8List decodedBytes = Base64Decoder().convert(photo);
259 274
             //logDev.log(decodedBytes.toString(), name: "DECODED BYTES photo");
260 275
             setState(() {
261
-              _imageToShow = Image
262
-                  .memory(decodedBytes, gaplessPlayback: true)
263
-                  .image;
276
+              _imageToShow = Image.memory(decodedBytes, gaplessPlayback: true).image;
264 277
             });
265 278
           }
266 279
         } else if (status == "failed") {
@@ -292,52 +305,24 @@ class _HomeScreenState extends State<HomeScreen> {
292 305
   Widget build(BuildContext context) {
293 306
     var size = MediaQuery.of(context).size;
294 307
 
295
-    /*ProgressDialog loading = ProgressDialog(context);
296
-    loading = ProgressDialog(context,
297
-    type: ProgressDialogType.normal,
298
-    isDismissible: false,
299
-    showLogs: true);
300
-    loading.style(
301
-    message: 'Please Wait .....',
302
-    borderRadius: 5,
303
-    backgroundColor: Colors.white,
304
-    progressWidget: CircularProgressIndicator(),
305
-    elevation: 10.0,
306
-    padding: EdgeInsets.all(10),
307
-    insetAnimCurve: Curves.easeInOut,
308
-    progress: 0.0,
309
-    maxProgress: 100.0,
310
-    progressTextStyle: TextStyle(
311
-    color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
312
-    messageTextStyle: TextStyle(
313
-    color: Colors.black,
314
-    fontSize: 15.0,
315
-    fontWeight: FontWeight.w600));*/
316
-
317 308
     return FocusDetector(
318 309
       /*onVisibilityGained: (){
319 310
         getProfileImage();
320
-        loading.hide();
321 311
       },
322 312
       onVisibilityLost: (){
323 313
         getProfileImage();
324
-        loading.hide();
325 314
       },
326 315
       onFocusLost: (){
327 316
         getProfileImage();
328
-        loading.hide();
329 317
       },*/
330 318
       onFocusGained: (){
331 319
         getProfileImage();
332
-        //loading.hide();
333 320
       },
334 321
 /*      onForegroundLost: (){
335 322
         getProfileImage();
336
-        loading.hide();
337 323
       },
338 324
       onForegroundGained: (){
339 325
         getProfileImage();
340
-        loading.hide();
341 326
       },*/
342 327
       child: Scaffold(
343 328
           body: SingleChildScrollView(

+ 3
- 23
lib/Screens/Login/login_screen.dart Bestand weergeven

@@ -18,7 +18,6 @@ import '../Home/home_screen.dart';
18 18
 import 'inputWidget.dart';
19 19
 import 'dart:developer' as logDev;
20 20
 //import 'package:plain_notification_token/plain_notification_token.dart';
21
-import 'dart:io' show Platform;
22 21
 
23 22
 class LoginView extends StatefulWidget {
24 23
   @override
@@ -51,25 +50,12 @@ class _LoginScreenState extends State<LoginScreen> {
51 50
   String version = "1.0.0";
52 51
   String notif_token = "";
53 52
 
54
-  String _pushToken = '0819';
55
-  //IosNotificationSettings? _settings;
56 53
   late StreamSubscription onTokenRefreshSubscription;
57 54
 
58 55
   @override
59 56
   void initState() {
60
-    /*WidgetsBinding.instance.addPostFrameCallback((_) {
61
-      getNotifToken();
62
-    });*/
63 57
     super.initState();
64 58
   }
65
-  
66
-  /*getNotifToken () async {
67
-    await Firebase.initializeApp(
68
-      options: DefaultFirebaseOptions.currentPlatform,
69
-    );
70
-    final notif_token = await FirebaseMessaging.instance.getToken();
71
-    logDev.log(notif_token.toString(), name: "NOTIFICATION TOKEN");
72
-  }*/
73 59
 
74 60
   @override
75 61
   Widget build(BuildContext context) {
@@ -201,7 +187,6 @@ class _LoginScreenState extends State<LoginScreen> {
201 187
                                           platform(),
202 188
                                           imei)
203 189
                                       .then((valueResult) async {
204
-                                    // loginPostResult = valueResult;
205 190
                                     Map<String, dynamic> object = json.decode(valueResult);
206 191
                                     if (object.containsKey("result").toString() == "true") {
207 192
                                       String status = object['result']['status'].toString();
@@ -225,15 +210,9 @@ class _LoginScreenState extends State<LoginScreen> {
225 210
                                         passwordController.clear();
226 211
 
227 212
                                         await loading.hide();
228
-                                        Navigator.pushReplacement(
229
-                                            context,
230
-                                            MaterialPageRoute(
231
-                                                builder: (context) =>
232
-                                                    HomeView()));
213
+                                        Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => HomeView()));
233 214
                                       } else if (status == "failed") {
234
-                                        String message = object['result']
235
-                                                ['message']
236
-                                            .toString();
215
+                                        String message = object['result']['message'].toString();
237 216
                                         Fluttertoast.showToast(
238 217
                                             msg: message,
239 218
                                             toastLength: Toast.LENGTH_SHORT,
@@ -405,6 +384,7 @@ alertDialogFailedResponse(BuildContext context){
405 384
   // show the dialog
406 385
   showDialog(
407 386
     context: context,
387
+    barrierDismissible: false,
408 388
     builder: (BuildContext context) {
409 389
       return alert;
410 390
     },

+ 99
- 21
lib/Screens/Menu/Absensi/absensi_history_screen.dart Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 import 'dart:convert';
2 2
 import 'package:flutter/material.dart';
3 3
 import 'package:google_fonts/google_fonts.dart';
4
+import 'package:hris_selfservice_mobile/constants.dart';
4 5
 import 'package:intl/intl.dart';
5 6
 import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
6 7
 import 'dart:developer' as logDev;
@@ -25,12 +26,16 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
25 26
   late List <String> dayDate_List;
26 27
   late List <String> date_List;
27 28
   late List <String> month_List;
29
+
28 30
   //late List <String> workingHours_List;
29 31
   late List <String> showCheckIn_List;
30 32
   late List <String> showCheckOut_List;
31 33
 
32 34
   int HistoryLength = 0;
33 35
 
36
+  //List Visibility Double Date
37
+  late List <bool> visibilityDate2;
38
+
34 39
   @override
35 40
   initState() {
36 41
     super.initState();
@@ -43,10 +48,13 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
43 48
     dayDate_List = [""];
44 49
     date_List = [""];
45 50
     month_List = [""];
51
+
46 52
     //workingHours_List = [""];
47 53
     showCheckIn_List = [""];
48 54
     showCheckOut_List = [""];
49 55
 
56
+    visibilityDate2 = [false];
57
+
50 58
     WidgetsBinding.instance.addPostFrameCallback((_) async {
51 59
       getHistoryData();
52 60
     });
@@ -102,9 +110,10 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
102 110
                 String showCheckInTime = checkInTimeLocal.substring(11, 19);
103 111
                 //logDev.log(showCheckInTime.substring(0,5), name: "SHOW CHECK IN TIME");
104 112
 
105
-                date_List.add(date);
106
-                month_List.add(month);
113
+                date_List.add(date + "|00");
114
+                month_List.add(month + "|000");
107 115
                 showCheckIn_List.add(showCheckInTime.substring(0,5));
116
+                //visibilityDate2[i+1] = false;
108 117
               }
109 118
               if (check_out != "false"){
110 119
                 //Convert UTC to Local Time - Check Out Time
@@ -115,18 +124,43 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
115 124
                 String showCheckOutTime = checkOutTimeLocal.substring(11, 19);
116 125
                 //logDev.log(showCheckOutTime, name: "SHOW CHECK OUT TIME");
117 126
                 showCheckOut_List.add(showCheckOutTime.substring(0,5));
127
+                //visibilityDate2[i+1] = true;
118 128
 
119 129
                 if (check_in.substring(0, 10) == check_out.substring(0,10)){
120 130
                   //Get Day Check In
121
-                  String dayDate = DateFormat('EEEE').format(DateTime.parse(check_in));
122
-                  dayDate_List.add(dayDate.substring(0,3));
131
+                  String dayDateIn = DateFormat('EEEE').format(DateTime.parse(check_in));
132
+                  String dateIn = DateFormat('dd').format(DateTime.parse(check_in));
133
+                  String monthIn = DateFormat('MMM').format(DateTime.parse(check_in));
134
+
135
+                  //dayDate_List.add(dayDate.substring(0,3));
136
+                  dayDate_List.add(dayDateIn.substring(0,3) + "|000");
137
+                  date_List[i+1] = dateIn + "|00";
138
+                  month_List[i+1] = monthIn + "|000";
139
+                  visibilityDate2[i+1] = false;
140
+
123 141
                 } else if (check_in.substring(0, 10) != check_out.substring(0,10)){
124 142
                   //Get Day Check In & Check Out
125 143
                   String dayDateIn = DateFormat('EEEE').format(DateTime.parse(check_in));
126
-                  String dayDateOut = DateFormat('EEEE').format(DateTime.parse(check_in));
127
-                  dayDate_List.add(dayDateIn.substring(0,3) + "\t" + dayDateOut.substring(0,3));
144
+                  String dayDateOut = DateFormat('EEEE').format(DateTime.parse(check_out));
145
+
146
+                  String dateIn = DateFormat('dd').format(DateTime.parse(check_in));
147
+                  String monthIn = DateFormat('MMM').format(DateTime.parse(check_in));
148
+
149
+                  String dateOut = DateFormat('dd').format(DateTime.parse(check_out));
150
+                  String monthOut = DateFormat('MMM').format(DateTime.parse(check_out));
151
+
152
+                  logDev.log(dateIn + "\n" + monthIn + "\n" + dateOut + "\n" + monthOut, name: "ABSENSI IN OUT TIDAK SAMA");
153
+
154
+                  dayDate_List.add(dayDateIn.substring(0,3) + "|" + dayDateOut.substring(0,3));
155
+                  date_List[i+1] = dateIn + "|" + dateOut;
156
+                  month_List[i+1] = monthIn + "|" + monthOut;
157
+
158
+                  visibilityDate2[i+1] = true;
159
+
160
+                  logDev.log(dayDate_List.toString() + "\n" + date_List.toString() + "\n" + month_List.toString(), name: "LIST ABSENSI IN OUT TIDAK SAMA");
128 161
                 }
129 162
               }
163
+
130 164
               if (check_in == "false"){
131 165
                 String show_check_in = "-";
132 166
                 showCheckIn_List.add(show_check_in);
@@ -138,7 +172,7 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
138 172
                 showCheckOut_List.add(show_check_out);
139 173
 
140 174
                 String dayDate = DateFormat('EEEE').format(DateTime.parse(check_in));
141
-                dayDate_List.add(dayDate.substring(0,3));
175
+                dayDate_List.add(dayDate.substring(0,3) + "|000");
142 176
               }
143 177
               if (check_in != "false" && check_out != "false"){
144 178
                 DateFormat format = DateFormat("HH:mm");
@@ -163,10 +197,13 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
163 197
             dayDate_List.removeAt(0);
164 198
             date_List.removeAt(0);
165 199
             month_List.removeAt(0);
200
+
166 201
             //workingHours_List.removeAt(0);
167 202
             showCheckIn_List.removeAt(0);
168 203
             showCheckOut_List.removeAt(0);
169 204
 
205
+            visibilityDate2.removeAt(0);
206
+
170 207
             HistoryLength = historyAbsensi.length;
171 208
           });
172 209
         }
@@ -236,29 +273,68 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
236 273
                           child: Row(
237 274
                             children: [
238 275
                               Expanded(
239
-                                  flex: 2,
276
+                                  flex: 3,
240 277
                                   child:
241 278
                                   Container(
279
+                                    alignment: Alignment.center,
242 280
                                     padding: EdgeInsets.all(5),
243 281
                                     decoration: BoxDecoration(
244 282
                                         border: Border.all(color: Colors.black),
245 283
                                         borderRadius: BorderRadius.all(Radius.circular(3)),
246 284
                                     ),
247 285
                                     child: Column(
286
+                                      mainAxisAlignment: MainAxisAlignment.center,
248 287
                                       children: [
249
-                                        Text(dayDate_List[i], style: GoogleFonts.fredokaOne(fontSize: 16, color: Colors.blueGrey)),
250
-                                        Text(date_List[i], style: GoogleFonts.fredokaOne(fontSize: 16, color: Colors.blueGrey)),
251
-                                        Text(month_List[i], style: GoogleFonts.fredokaOne(fontSize: 16, color: Colors.blueGrey)),
288
+                                        Row(
289
+                                          children: [
290
+                                            Text(dayDate_List[i].substring(0,3), style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
291
+                                            Visibility(
292
+                                              visible: visibilityDate2[i],
293
+                                              child: Text("\t|\t", style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
294
+                                            ),
295
+                                            Visibility(
296
+                                              visible: visibilityDate2[i],
297
+                                              child: Text(dayDate_List[i].substring(4,7), style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
298
+                                            )
299
+                                          ],
300
+                                        ),
301
+                                        Row(
302
+                                          children: [
303
+                                            Text(date_List[i].substring(0,2), style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
304
+                                            Visibility(
305
+                                              visible: visibilityDate2[i],
306
+                                              child: Text("\t|\t", style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
307
+                                            ),
308
+                                            Visibility(
309
+                                              visible: visibilityDate2[i],
310
+                                              child: Text(date_List[i].substring(3,5), style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
311
+                                            ),
312
+                                          ],
313
+                                        ),
314
+                                        Row(
315
+                                          children: [
316
+                                            Text(month_List[i].substring(0,3), style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
317
+                                            Visibility(
318
+                                              visible: visibilityDate2[i],
319
+                                              child: Text("\t|\t", style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
320
+                                            ),
321
+                                            Visibility(
322
+                                              visible: visibilityDate2[i],
323
+                                              child: Text(month_List[i].substring(4,7), style: GoogleFonts.fredokaOne(fontSize: 15, color: Colors.blueGrey)),
324
+                                            )
325
+                                          ],
326
+                                        ),
252 327
                                       ],
253
-                                    ),
328
+                                    )
329
+                                    ,
254 330
                                   )
255 331
                               ),
256 332
                               Expanded(
257 333
                                 flex: 2,
258 334
                                 child: Column(
259 335
                                   children: [
260
-                                    Text("Check In", style: GoogleFonts.fredokaOne(fontSize: 17),),
261
-                                    Text(showCheckIn_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 17),),
336
+                                    Text("Check In", style: GoogleFonts.fredokaOne(fontSize: 16),textAlign: TextAlign.center),
337
+                                    Text(showCheckIn_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 16),textAlign: TextAlign.center),
262 338
                                   ],
263 339
                                 ),
264 340
                               ),
@@ -266,17 +342,17 @@ class _HistoryAbsensi extends State<HistoryAbsensi> {
266 342
                                 flex: 2,
267 343
                                 child: Column(
268 344
                                   children: [
269
-                                    Text("Check Out", style: GoogleFonts.fredokaOne(fontSize: 16),),
270
-                                    Text(showCheckOut_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 17),),
345
+                                    Text("Check Out", style: GoogleFonts.fredokaOne(fontSize: 16),textAlign: TextAlign.center),
346
+                                    Text(showCheckOut_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 16),textAlign: TextAlign.center),
271 347
                                   ],
272 348
                                 ),
273 349
                               ),
274 350
                               Expanded(
275
-                                flex: 3,
351
+                                flex: 2,
276 352
                                 child: Column(
277 353
                                   children: [
278
-                                    Text("Working Hours", style: GoogleFonts.fredokaOne(fontSize: 16),),
279
-                                    Text(worked_hours_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 17),),
354
+                                    Text("Working\nHours", style: GoogleFonts.fredokaOne(fontSize: 16), textAlign: TextAlign.center),
355
+                                    Text(worked_hours_List[i], style: GoogleFonts.barlowSemiCondensed(fontSize: 16),textAlign: TextAlign.center),
280 356
                                   ],
281 357
                                 ),
282 358
                               ),
@@ -319,7 +395,7 @@ alertDialogFailedRetrievedData(BuildContext context) {
319 395
 
320 396
   // set up the AlertDialog
321 397
   AlertDialog alert = AlertDialog(
322
-    title: Text("Employee Self Service"),
398
+    title: Text(appName),
323 399
     content: Text("Failed to Retrieve Data"),
324 400
     actions: [
325 401
       noButton,
@@ -330,6 +406,7 @@ alertDialogFailedRetrievedData(BuildContext context) {
330 406
   // show the dialog
331 407
   showDialog(
332 408
     context: context,
409
+    barrierDismissible: false,
333 410
     builder: (BuildContext context) {
334 411
       return alert;
335 412
     },
@@ -357,7 +434,7 @@ alertDialogFailedResponse(BuildContext context){
357 434
 
358 435
   // set up the AlertDialog
359 436
   AlertDialog alert = AlertDialog(
360
-    title: Text("Employee Self Service"),
437
+    title: Text(appName),
361 438
     content: Text("Server Response Error"),
362 439
     actions: [
363 440
       noButton,
@@ -368,6 +445,7 @@ alertDialogFailedResponse(BuildContext context){
368 445
   // show the dialog
369 446
   showDialog(
370 447
     context: context,
448
+    barrierDismissible: false,
371 449
     builder: (BuildContext context) {
372 450
       return alert;
373 451
     },

+ 9
- 0
lib/Screens/Menu/Absensi/absensi_screen.dart Bestand weergeven

@@ -723,6 +723,7 @@ alertDialogFailedRetrievedData(BuildContext context) {
723 723
   // show the dialog
724 724
   showDialog(
725 725
     context: context,
726
+    barrierDismissible: false,
726 727
     builder: (BuildContext context) {
727 728
       return alert;
728 729
     },
@@ -760,6 +761,7 @@ alertDialogFailedResponse(BuildContext context) {
760 761
   // show the dialog
761 762
   showDialog(
762 763
     context: context,
764
+    barrierDismissible: false,
763 765
     builder: (BuildContext context) {
764 766
       return alert;
765 767
     },
@@ -788,6 +790,7 @@ alertDialogSuccessCheckIn(BuildContext context) {
788 790
   // show the dialog
789 791
   showDialog(
790 792
     context: context,
793
+    barrierDismissible: false,
791 794
     builder: (BuildContext context) {
792 795
       return alert;
793 796
     },
@@ -816,6 +819,7 @@ alertDialogSuccessCheckOut(BuildContext context) {
816 819
   // show the dialog
817 820
   showDialog(
818 821
     context: context,
822
+    barrierDismissible: false,
819 823
     builder: (BuildContext context) {
820 824
       return alert;
821 825
     },
@@ -844,6 +848,7 @@ alertDialogFailedCheckIn(BuildContext context) {
844 848
   // show the dialog
845 849
   showDialog(
846 850
     context: context,
851
+    barrierDismissible: false,
847 852
     builder: (BuildContext context) {
848 853
       return alert;
849 854
     },
@@ -872,6 +877,7 @@ alertDialogFailedCheckOut(BuildContext context) {
872 877
   // show the dialog
873 878
   showDialog(
874 879
     context: context,
880
+    barrierDismissible: false,
875 881
     builder: (BuildContext context) {
876 882
       return alert;
877 883
     },
@@ -900,6 +906,7 @@ alertDialogFakeGPSDetected(BuildContext context) {
900 906
   // show the dialog
901 907
   showDialog(
902 908
     context: context,
909
+    barrierDismissible: false,
903 910
     builder: (BuildContext context) {
904 911
       return alert;
905 912
     },
@@ -938,6 +945,7 @@ alertDialogPermissionDenied(BuildContext context) {
938 945
   // show the dialog
939 946
   showDialog(
940 947
     context: context,
948
+    barrierDismissible: false,
941 949
     builder: (BuildContext context) {
942 950
       return alert;
943 951
     },
@@ -964,6 +972,7 @@ alertDialogPermissionDeniedForever(BuildContext context) {
964 972
   // show the dialog
965 973
   showDialog(
966 974
     context: context,
975
+    barrierDismissible: false,
967 976
     builder: (BuildContext context) {
968 977
       return alert;
969 978
     },

+ 113
- 36
lib/Screens/Menu/SlipGaji/slipgaji_screen.dart Bestand weergeven

@@ -2,16 +2,17 @@ import 'dart:convert';
2 2
 
3 3
 import 'package:flutter/cupertino.dart';
4 4
 import 'package:flutter/material.dart';
5
-import 'package:fluttertoast/fluttertoast.dart';
6 5
 import 'package:google_fonts/google_fonts.dart';
7 6
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/RequestHttp/detailSlipGaji_post.dart';
8 7
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/RequestHttp/downloadSlipGaji_post.dart';
9 8
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/RequestHttp/historySlipGaji_post.dart';
10 9
 import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/background.dart';
10
+import 'package:hris_selfservice_mobile/constants.dart';
11 11
 import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
12 12
 import 'dart:developer' as logDev;
13 13
 
14 14
 import 'package:shared_preferences/shared_preferences.dart';
15
+import 'package:url_launcher/url_launcher.dart';
15 16
 
16 17
 class SlipGajiScreen extends StatefulWidget {
17 18
   const SlipGajiScreen({Key? key}) : super(key: key);
@@ -145,13 +146,6 @@ class _SlipGajiScreenState extends State<SlipGajiScreen> {
145 146
       } else {
146 147
         setState((){
147 148
           alertDialogFailedResponse(context);
148
-         /* Fluttertoast.showToast(
149
-              msg: "Server Response Error",
150
-              toastLength: Toast.LENGTH_SHORT,
151
-              gravity: ToastGravity.CENTER,
152
-              timeInSecForIosWeb: 1,
153
-              textColor: Colors.white,
154
-              fontSize: 16.0);*/
155 149
         });
156 150
         loading.hide();
157 151
       }
@@ -179,8 +173,6 @@ class _SlipGajiScreenState extends State<SlipGajiScreen> {
179 173
             color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
180 174
     loading.show();
181 175
 
182
-    //logDev.log(batchID_List.toString(), name: "ALL BATCH ID");
183
-
184 176
     final SharedPreferences prefs = await SharedPreferences.getInstance();
185 177
       DetailSlipGaji_Post.connectToAPI(batchID_List[indexBatchID]).then((valueResult) async {
186 178
         Map<String, dynamic> object = json.decode(valueResult);
@@ -193,33 +185,38 @@ class _SlipGajiScreenState extends State<SlipGajiScreen> {
193 185
               alertDialogFailedRetrievedData(context);
194 186
             });
195 187
           } else {
196
-            //List <dynamic> detailSlipGaji = object['result'];
188
+            List <dynamic> detailSlipGaji = object['result'];
197 189
             setState(() {
198 190
               position = prefs.getString('position')!;
199
-              String nomor = object['result']['number'];
200
-              String tanggalAwal = object['result']['date_from'];
201
-              String tanggalAkhir = object['result']['date_to'];
202
-              String namaPegawai = object['result']['employee'];
203
-              String status = object['result']['status'];
204
-              String structure =object['result']['structure'];
205
-              number_List.add(nomor);
206
-              structure_List.add(structure);
207
-              period_List.add(tanggalAwal + " to " + tanggalAkhir);
208
-              namaPegawai_List.add(namaPegawai);
209
-              status_List.add(status);
210
-
211
-              List <dynamic> component = object['result']['component'];
212
-              logDev.log(component.length.toString(), name: "BANYAK COMPONENT");
213
-              for (int j = 0; j < component.length; j++){
214
-                String name = component[j]['name'].toString();
215
-                String category = component[j]['category'].toString();
216
-                int total = component[j]['total'];
217
-
218
-                name_List.add(name);
219
-                category_List.add(category);
220
-                total_List.add(total.toString());
191
+              logDev.log(position, name: "POSITION");
192
+              for (int i = 0; i < detailSlipGaji.length; i++){
193
+                String nomor = detailSlipGaji[i]['number'].toString();
194
+                logDev.log(nomor, name: "NOMOR/NUMBER");
195
+                String tanggalAwal = detailSlipGaji[i]['date_from'];
196
+                String tanggalAkhir = detailSlipGaji[i]['date_to'];
197
+                String namaPegawai = detailSlipGaji[i]['employee'];
198
+                String status = detailSlipGaji[i]['status'];
199
+                String structure =detailSlipGaji[i]['structure'];
200
+                //number_List.add(nomor);
201
+                structure_List.add(structure);
202
+                period_List.add(tanggalAwal + " to " + tanggalAkhir);
203
+                namaPegawai_List.add(namaPegawai);
204
+                status_List.add(status);
205
+
206
+                List <dynamic> component =detailSlipGaji[i]['component'];
207
+                logDev.log(component.length.toString(), name: "BANYAK COMPONENT");
208
+                for (int j = 0; j < component.length; j++){
209
+                  String name = component[j]['name'].toString();
210
+                  String category = component[j]['category'].toString();
211
+                  double total = component[j]['total'];
212
+
213
+                  name_List.add(name);
214
+                  category_List.add(category);
215
+                  total_List.add(total.toString());
216
+                }
221 217
               }
222 218
 
219
+
223 220
               number_List.remove(0);
224 221
               structure_List.removeAt(0);
225 222
               period_List.removeAt(0);
@@ -391,7 +388,49 @@ class _SlipGajiScreenState extends State<SlipGajiScreen> {
391 388
                         alignment: Alignment.centerRight,
392 389
                         child: ElevatedButton(
393 390
                           onPressed: () {
394
-                            DownloadSlipGaji_Post.connectToAPI(batch_id).then((value) => null)
391
+                            ProgressDialog loading = ProgressDialog(context);
392
+                            loading = ProgressDialog(context,
393
+                                type: ProgressDialogType.normal, isDismissible: false, showLogs: true);
394
+                            loading.style(
395
+                                message: 'Please Wait .....',
396
+                                borderRadius: 3,
397
+                                backgroundColor: Colors.white,
398
+                                progressWidget: CircularProgressIndicator(),
399
+                                elevation: 10.0,
400
+                                padding: EdgeInsets.all(10),
401
+                                insetAnimCurve: Curves.easeInOut,
402
+                                progress: 0.0,
403
+                                maxProgress: 100.0,
404
+                                progressTextStyle: TextStyle(
405
+                                    color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
406
+                                messageTextStyle: TextStyle(
407
+                                    color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600));
408
+                            loading.show();
409
+
410
+                            DownloadSlipGaji_Post.connectToAPI(batchID_List[indexBatchID]).then((valueResult) async {
411
+                              Map<String, dynamic> object = json.decode(valueResult);
412
+                              if (object.containsKey("result").toString() == "true"){
413
+                                String result = object['result'].toString();
414
+                                if (result.contains("failed")) {
415
+                                  loading.hide();
416
+                                  setState(() {
417
+                                    alertDialogFailedDownloadPayslip(context);
418
+                                  });
419
+                                } else if (result.contains("url")){
420
+                                  loading.hide();
421
+                                  setState(() {
422
+                                    //_launchURL(Uri.parse(baseURL + object['result']['url'].toString()));
423
+                                    Uri url = Uri.parse(Uri.encodeFull(baseURL + object['result']['url'.toString()]));
424
+                                    launchUrl(url, mode: LaunchMode.externalApplication);
425
+                                  });
426
+                                }
427
+                              } else {
428
+                                loading.hide();
429
+                                setState((){
430
+                                  alertDialogFailedResponse(context);
431
+                                });
432
+                              }
433
+                            });
395 434
                           },
396 435
                           style: ElevatedButton.styleFrom(),
397 436
                           child: Text('Download Slip Gaji'),
@@ -414,6 +453,13 @@ const List<Color> Gradients1 = [
414 453
   Color(0xFF03A0FE),
415 454
 ];
416 455
 
456
+launchURL(Uri url) async {
457
+  if (await canLaunchUrl(url)) {
458
+    await launchUrl(url);
459
+  } else {
460
+    throw 'Could not launch $url';
461
+  }
462
+}
417 463
 
418 464
 alertDialogFailedRetrievedData(BuildContext context){
419 465
   Widget okButton = TextButton(
@@ -436,7 +482,7 @@ alertDialogFailedRetrievedData(BuildContext context){
436 482
 
437 483
   // set up the AlertDialog
438 484
   AlertDialog alert = AlertDialog(
439
-    title: Text("Employee Self Service"),
485
+    title: Text(appName),
440 486
     content: Text("Failed to Retrieve Data"),
441 487
     actions: [
442 488
       noButton,
@@ -447,6 +493,7 @@ alertDialogFailedRetrievedData(BuildContext context){
447 493
   // show the dialog
448 494
   showDialog(
449 495
     context: context,
496
+    barrierDismissible: false,
450 497
     builder: (BuildContext context) {
451 498
       return alert;
452 499
     },
@@ -474,7 +521,7 @@ alertDialogFailedResponse(BuildContext context){
474 521
 
475 522
   // set up the AlertDialog
476 523
   AlertDialog alert = AlertDialog(
477
-    title: Text("Employee Self Service"),
524
+    title: Text(appName),
478 525
     content: Text("Server Response Error"),
479 526
     actions: [
480 527
       noButton,
@@ -485,6 +532,36 @@ alertDialogFailedResponse(BuildContext context){
485 532
   // show the dialog
486 533
   showDialog(
487 534
     context: context,
535
+    barrierDismissible: false,
536
+    builder: (BuildContext context) {
537
+      return alert;
538
+    },
539
+  );
540
+}
541
+
542
+alertDialogFailedDownloadPayslip(BuildContext context){
543
+  Widget okButton = TextButton(
544
+    child: Text("Try Again"),
545
+    onPressed: () {
546
+      Navigator.of(context, rootNavigator: true).pop();
547
+      Navigator.pop(context);
548
+
549
+    },
550
+  );
551
+
552
+  // set up the AlertDialog
553
+  AlertDialog alert = AlertDialog(
554
+    title: Text(appName),
555
+    content: Text("Failed to Download Payslip"),
556
+    actions: [
557
+      okButton,
558
+    ],
559
+  );
560
+
561
+  // show the dialog
562
+  showDialog(
563
+    context: context,
564
+    barrierDismissible: false,
488 565
     builder: (BuildContext context) {
489 566
       return alert;
490 567
     },

+ 4
- 1
lib/Screens/Settings/RequestHttp/changePassword_post.dart Bestand weergeven

@@ -13,9 +13,12 @@ class ChangePassword_Post {
13 13
 
14 14
   ChangePassword_Post({required this.password, required this.new_password, required this.session});
15 15
 
16
-  static Future<String> connectToAPI(String password, String new_password, String session) async {
16
+  static Future<String> connectToAPI(String password, String new_password) async {
17 17
     String URL = baseURL + "/api/v1/change_password";
18 18
 
19
+    final SharedPreferences prefs = await SharedPreferences.getInstance();
20
+    final session = prefs.getString('session');
21
+
19 22
     var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
20 23
       "data": [
21 24
         {

+ 1
- 1
lib/Screens/Settings/RequestHttp/changeprofileimage_post.dart Bestand weergeven

@@ -13,7 +13,7 @@ class ChangeProfileImage_Post {
13 13
   ChangeProfileImage_Post({required this.session,
14 14
     required this.imageBase64});
15 15
 
16
-  static Future<String> connectToAPI(String session, String imageBase64) async {
16
+  static Future<String> connectToAPI(String imageBase64) async {
17 17
     String URL = baseURL + "/api/v1/change_profile";
18 18
 
19 19
     final SharedPreferences prefs = await SharedPreferences.getInstance();

+ 1
- 2
lib/Screens/Settings/RequestHttp/getDetail_post.dart Bestand weergeven

@@ -3,7 +3,6 @@ import 'dart:core';
3 3
 import 'package:http/http.dart' as http;
4 4
 import 'package:hris_selfservice_mobile/constants.dart';
5 5
 import 'dart:developer' as developer;
6
-
7 6
 import 'package:shared_preferences/shared_preferences.dart';
8 7
 
9 8
 class GetDetail_Post {
@@ -11,7 +10,7 @@ class GetDetail_Post {
11 10
 
12 11
   GetDetail_Post({required this.session});
13 12
 
14
-  static Future<String> connectToAPI(String session) async {
13
+  static Future<String> connectToAPI() async {
15 14
     String URL = baseURL + "/api/v1/get_detail";
16 15
 
17 16
     final SharedPreferences prefs = await SharedPreferences.getInstance();

+ 1
- 1
lib/Screens/Settings/RequestHttp/logout_post.dart Bestand weergeven

@@ -11,7 +11,7 @@ class Logout_Post {
11 11
 
12 12
   Logout_Post({required this.session});
13 13
 
14
-  static Future<String> connectToAPI(String session) async {
14
+  static Future<String> connectToAPI() async {
15 15
     String URL = baseURL + "/api/v1/logout";
16 16
 
17 17
     final SharedPreferences prefs = await SharedPreferences.getInstance();

+ 55
- 44
lib/Screens/Settings/settings_screen.dart Bestand weergeven

@@ -104,17 +104,15 @@ class _SettingsScreenState extends State<SettingsScreen> {
104 104
         if (status == "success") {
105 105
           String photo = object['result']['photo'].toString();
106 106
           if (photo == "false") {
107
-            _imageToShow = AssetImage('assets/images/ic_administrator.png');
108
-            logDev.log("PHOTO RESULT FALSE", name: "DECODED BYTES");
107
+            setState(() {
108
+              _imageToShow = AssetImage('assets/images/ic_administrator.png');
109
+            });
109 110
           } else if (photo != "false") {
110 111
             Uint8List decodedBytes = Base64Decoder().convert(photo);
111 112
             logDev.log(decodedBytes.toString(), name: "DECODED BYTES photo");
112 113
             setState(() {
113 114
               _imageToShow = Image.memory(decodedBytes, gaplessPlayback: true).image;
114 115
             });
115
-            //_imageToShow = Image.memory(base64Decode(photo));
116
-            //logDev.log(_imageToShow.toString(), name: "Image to Show");
117
-            //_imageToShow = AssetImage('assets/images/collaboration.png');
118 116
           }
119 117
         } else if (status == "failed") {
120 118
           String message = object['result']['message'].toString();
@@ -138,23 +136,20 @@ class _SettingsScreenState extends State<SettingsScreen> {
138 136
         loading.hide();
139 137
       }
140 138
     });
141
-    //return Image.memory(decodedBytes);
142 139
     loading.hide();
143 140
     return _imageToShow;
144 141
   }
145 142
 
146 143
   //Get Detail
147 144
   getDetail() async {
148
-    final SharedPreferences prefs = await SharedPreferences.getInstance();
149
-    final session = prefs.getString('session');
150
-    GetDetail_Post.connectToAPI(session!).then((valueResult) async {
145
+    GetDetail_Post.connectToAPI().then((valueResult) async {
151 146
       Map<String, dynamic> object = json.decode(valueResult);
152 147
       if (object.containsKey("result").toString() == "true") {
153 148
         statusDetail = object['result']['status'].toString();
154 149
         String message = object['result']['message'].toString();
155 150
         if (statusDetail == "failed" || message == "User Not Found") {
156 151
           Fluttertoast.showToast(
157
-              msg: message + ", Please login again!",
152
+              msg: message + ", Please restart the Application!",
158 153
               toastLength: Toast.LENGTH_SHORT,
159 154
               gravity: ToastGravity.CENTER,
160 155
               timeInSecForIosWeb: 1,
@@ -192,6 +187,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
192 187
             timeInSecForIosWeb: 1,
193 188
             textColor: Colors.white,
194 189
             fontSize: 16.0);
190
+
195 191
       }
196 192
     });
197 193
   }
@@ -305,47 +301,41 @@ class _SettingsScreenState extends State<SettingsScreen> {
305 301
                           ),
306 302
                         ),
307 303
                         onTap: () async {
308
-                          final SharedPreferences prefs =
309
-                              await SharedPreferences.getInstance();
310
-                          final String? session = prefs.getString('session');
311 304
                           final ImagePicker _picker = ImagePicker();
312 305
                           final XFile? imagePicked = await _picker.pickImage(
313 306
                               source: ImageSource.gallery);
314 307
                           if (imagePicked != null) {
315 308
                             _imagePath = File(imagePicked.path);
316
-                            List<int> imageBytes =
317
-                                _imagePath!.readAsBytesSync();
309
+                            List<int> imageBytes = _imagePath!.readAsBytesSync();
318 310
                             String base64Image = base64Encode(imageBytes);
319
-                            logDev.log(base64Image, name: "String base64");
311
+                            //logDev.log(base64Image, name: "String base64");
320 312
                             await loading.show();
321
-                            ChangeProfileImage_Post.connectToAPI(
322
-                                    session!, base64Image)
323
-                                .then((valueResult) async {
324
-                              Map<String, dynamic> object =
325
-                                  json.decode(valueResult);
313
+                            ChangeProfileImage_Post.connectToAPI(base64Image).then((valueResult) async {
314
+                              Map<String, dynamic> object = json.decode(valueResult);
326 315
                               if (object.containsKey("result").toString() == "true") {
327 316
                                 String status = object['result']['status'].toString();
328 317
                                 String message = object['result']['message'].toString();
329 318
                                 if (status == "success") {
330
-                                  _imageToShow =
331
-                                      FileImage(File(imagePicked.path));
332
-                                  Fluttertoast.showToast(
319
+                                  _imageToShow = FileImage(File(imagePicked.path));
320
+                                 /* Fluttertoast.showToast(
333 321
                                       msg: message,
334 322
                                       toastLength: Toast.LENGTH_LONG,
335 323
                                       gravity: ToastGravity.CENTER,
336 324
                                       timeInSecForIosWeb: 1,
337 325
                                       textColor: Colors.white,
338
-                                      fontSize: 16.0);
326
+                                      fontSize: 16.0);*/
339 327
                                   await loading.hide();
328
+                                  showAlertDialogChangeProfile(context, "Success, " + message, "Ok");
340 329
                                 } else if (status == "failed") {
341
-                                  Fluttertoast.showToast(
330
+                                 /* Fluttertoast.showToast(
342 331
                                       msg: message,
343 332
                                       toastLength: Toast.LENGTH_LONG,
344 333
                                       gravity: ToastGravity.CENTER,
345 334
                                       timeInSecForIosWeb: 1,
346 335
                                       textColor: Colors.white,
347
-                                      fontSize: 16.0);
336
+                                      fontSize: 16.0);*/
348 337
                                   await loading.hide();
338
+                                  showAlertDialogChangeProfile(context, "Failed, " + message, "Back");
349 339
                                 }
350 340
                               } else {
351 341
                                 Fluttertoast.showToast(
@@ -799,11 +789,7 @@ showAlertDialogSavePassword(BuildContext context) {
799 789
               fontWeight: FontWeight.w600));
800 790
       await loading.show();
801 791
 
802
-      final SharedPreferences prefs = await SharedPreferences.getInstance();
803
-      final session = prefs.getString('session');
804
-      ChangePassword_Post.connectToAPI(passwordController.text.toString(),
805
-              newPasswordController.text.toString(), session!)
806
-          .then((valueResult) async {
792
+      ChangePassword_Post.connectToAPI(passwordController.text.toString(), newPasswordController.text.toString()).then((valueResult) async {
807 793
         Map<String, dynamic> object = json.decode(valueResult);
808 794
         if (object.containsKey("result").toString() == "true") {
809 795
           String status = object['result']['status'].toString();
@@ -821,11 +807,11 @@ showAlertDialogSavePassword(BuildContext context) {
821 807
             newPasswordController.clear();
822 808
             retypeNewPasswordController.clear();
823 809
 
824
-            final session = await prefs.remove('session');
810
+            final SharedPreferences prefs = await SharedPreferences.getInstance();
811
+            await prefs.remove('session');
825 812
             await loading.hide();
826 813
             Navigator.of(context, rootNavigator: true).pop();
827
-            Navigator.pushReplacement(
828
-                context, MaterialPageRoute(builder: (context) => LoginView()));
814
+            Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => LoginView()));
829 815
           } else if (status == "failed") {
830 816
             Fluttertoast.showToast(
831 817
                 msg: message,
@@ -868,6 +854,7 @@ showAlertDialogSavePassword(BuildContext context) {
868 854
   // show the dialog
869 855
   showDialog(
870 856
     context: context,
857
+    barrierDismissible: false,
871 858
     builder: (BuildContext context) {
872 859
       return alert;
873 860
     },
@@ -943,21 +930,16 @@ showAlertDialogLogout(BuildContext context) {
943 930
               fontWeight: FontWeight.w600));
944 931
       await loading.show();
945 932
 
946
-      final SharedPreferences prefs = await SharedPreferences.getInstance();
947
-      final session = prefs.getString('session');
948
-
949
-      Logout_Post.connectToAPI(session!).then((valueResult) async {
933
+      Logout_Post.connectToAPI().then((valueResult) async {
950 934
         Map<String, dynamic> object = json.decode(valueResult);
951 935
         if (object.containsKey("result").toString() == "true") {
952 936
           String status = object['result']['status'].toString();
953 937
           if (status == "success") {
954
-            final session = await prefs.remove('session');
938
+            final SharedPreferences prefs = await SharedPreferences.getInstance();
939
+            await prefs.remove('session');
955 940
             Navigator.of(context, rootNavigator: true).pop();
956 941
             await loading.hide();
957
-            Navigator.pushAndRemoveUntil(
958
-                context,
959
-                MaterialPageRoute(builder: (context) => LoginView()),
960
-                (route) => false);
942
+            Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LoginView()), (route) => false);
961 943
           } else if (status == "failed") {
962 944
             String message = object['result']['message'].toString();
963 945
             Fluttertoast.showToast(
@@ -1003,8 +985,37 @@ showAlertDialogLogout(BuildContext context) {
1003 985
   // show the dialog
1004 986
   showDialog(
1005 987
     context: context,
988
+    barrierDismissible: false,
989
+    builder: (BuildContext context) {
990
+      return alert;
991
+    },
992
+  );
993
+}
994
+
995
+//Alert Change Profile
996
+showAlertDialogChangeProfile(BuildContext context, String message, String buttonMessage) {
997
+  // set up the button
998
+  Widget okButton = TextButton(
999
+    child: Text(buttonMessage),
1000
+    onPressed: () {
1001
+      Navigator.of(context, rootNavigator: true).pop();
1002
+    },
1003
+  );
1004
+
1005
+  // set up the AlertDialog
1006
+  AlertDialog alert = AlertDialog(
1007
+    title: Text("Employee Self Service"),
1008
+    content: Text(message),
1009
+    actions: [okButton],
1010
+  );
1011
+
1012
+  // show the dialog
1013
+  showDialog(
1014
+    context: context,
1015
+    barrierDismissible: false,
1006 1016
     builder: (BuildContext context) {
1007 1017
       return alert;
1008 1018
     },
1009 1019
   );
1010 1020
 }
1021
+

+ 6
- 14
lib/Screens/Splash/loginstatus_post.dart Bestand weergeven

@@ -2,7 +2,6 @@ import 'dart:convert';
2 2
 import 'dart:core';
3 3
 import 'package:http/http.dart' as http;
4 4
 import 'package:hris_selfservice_mobile/constants.dart';
5
-import 'package:shared_preferences/shared_preferences.dart';
6 5
 import 'dart:developer' as logDev;
7 6
 
8 7
 class LoginStatus_Post {
@@ -11,14 +10,13 @@ class LoginStatus_Post {
11 10
   late String session;
12 11
   late String notif_token;
13 12
 
14
-  LoginStatus_Post(
15
-      {required this.version,
16
-      required this.device,
17
-      required this.session,
18
-      required this.notif_token});
13
+  LoginStatus_Post({
14
+    required this.version,
15
+    required this.device,
16
+    required this.session,
17
+    required this.notif_token});
19 18
 
20
-  static Future<String> connectToAPI(
21
-      String version, String device, String session, String notif_token) async {
19
+  static Future<String> connectToAPI(String version, String device, String session, String notif_token) async {
22 20
     String URL = baseURL + "/api/v1/login_status";
23 21
     print(URL);
24 22
 
@@ -38,11 +36,5 @@ class LoginStatus_Post {
38 36
 
39 37
     logDev.log(sendData.body, name: "Login Status");
40 38
     return sendData.body;
41
-
42
-
43
-    // var jsonObject = json.decode(sendData.body);
44
-    //developer.log(jsonObject.toString(), name: 'Log');
45
-    // return jsonObject;
46
-    // return LoginPostResult.createPostResult(jsonObject);
47 39
   }
48 40
 }

+ 34
- 16
lib/Screens/Splash/splash_screen.dart Bestand weergeven

@@ -1,11 +1,13 @@
1 1
 import 'dart:async';
2 2
 import 'dart:convert';
3
+import 'dart:io';
3 4
 import 'package:flutter/material.dart';
4 5
 import 'package:flutter/services.dart';
5 6
 import 'package:fluttertoast/fluttertoast.dart';
6 7
 import 'package:google_fonts/google_fonts.dart';
7 8
 import 'package:hris_selfservice_mobile/Screens/Login/login_screen.dart';
8 9
 import 'package:hris_selfservice_mobile/Screens/Splash/loginstatus_post.dart';
10
+import 'package:hris_selfservice_mobile/constants.dart';
9 11
 import 'package:lottie/lottie.dart';
10 12
 import 'package:shared_preferences/shared_preferences.dart';
11 13
 import '../Home/home_screen.dart';
@@ -77,7 +79,7 @@ class SplashScreen extends StatelessWidget {
77 79
                     repeat: true),
78 80
               ),
79 81
             ),
80
-            Text('Employee Self Service',
82
+            Text(appName,
81 83
                 style: GoogleFonts.carterOne(fontSize: 25, color: Colors.white))
82 84
           ],
83 85
         ),
@@ -94,18 +96,22 @@ Future<void> loginStatus(BuildContext context) async {
94 96
   String? notif_token = prefs.getString('notif_token');
95 97
 
96 98
   if (session == null) {
99
+    version = "1.0.0";
97 100
     session = "";
98
-    version = "";
99
-    device = "";
100 101
     notif_token = "";
102
+
103
+    if (Platform.isAndroid){
104
+      device = "android";
105
+    } else if (Platform.isIOS){
106
+      device = "ios";
107
+    }
108
+
101 109
   }
102 110
 
103
-  logDev.log(session, name: "SESSIONNYA");
111
+  //logDev.log(session, name: "SESSIONNYA");
104 112
 
105
-  LoginStatus_Post.connectToAPI(version!, device!, session, notif_token!)
106
-      .then((valueResult) async {
113
+  LoginStatus_Post.connectToAPI(version!, device!, session, notif_token!).then((valueResult) async {
107 114
     Map<String, dynamic> object = json.decode(valueResult);
108
-    logDev.log(valueResult, name: "LOGIN STATUS!");
109 115
     if (object.containsKey("result").toString() == "true") {
110 116
       String status = object['result']['status'].toString();
111 117
       if (status == "success") {
@@ -137,9 +143,12 @@ Future<void> loginStatus(BuildContext context) async {
137 143
           if (block == "false") {
138 144
             Widget okButton = TextButton(
139 145
               child: Text(action),
140
-              onPressed: () {
141
-                _launchURL(Uri.parse("https://play.google.com/store/apps"));
142
-                SystemChannels.platform.invokeMethod('SystemNavigator.pop');
146
+              onPressed: () async {
147
+                Uri url = Uri.parse(Uri.encodeFull("https://play.google.com/store/apps"));
148
+                //final Uri uri = Uri(scheme: "https", host: "play.google.com");
149
+                if(!await launchUrl(url, mode: LaunchMode.externalApplication)) {
150
+                  throw "Can not launch url";
151
+                }
143 152
               },
144 153
             );
145 154
 
@@ -156,14 +165,16 @@ Future<void> loginStatus(BuildContext context) async {
156 165
 
157 166
             // set up the AlertDialog
158 167
             AlertDialog alert = AlertDialog(
159
-              title: Text("Employee Self Service"),
168
+              title: Text(appName),
160 169
               content: Text(title + "\n" + message),
161 170
               actions: [noButton, okButton],
171
+
162 172
             );
163 173
 
164 174
             // show the dialog
165 175
             showDialog(
166 176
               context: context,
177
+              barrierDismissible: false,
167 178
               builder: (BuildContext context) {
168 179
                 return alert;
169 180
               },
@@ -171,10 +182,15 @@ Future<void> loginStatus(BuildContext context) async {
171 182
           } else if (block == "true") {
172 183
             Widget okButton = TextButton(
173 184
               child: Text(action),
174
-              onPressed: () {
185
+              onPressed: () async {
175 186
                 if (action == "update") {
176
-                  _launchURL(Uri.parse("https://play.google.com/store/apps"));
177
-                  SystemChannels.platform.invokeMethod('SystemNavigator.pop');
187
+                 /* _launchURL(Uri.parse("https://play.google.com/store/apps"));
188
+                  SystemChannels.platform.invokeMethod('SystemNavigator.pop');*/
189
+                  Uri url = Uri.parse(Uri.encodeFull("https://play.google.com/store/apps"));
190
+                  //final Uri uri = Uri(scheme: "https",  host: "play.google.com");
191
+                  if(!await launchUrl(url, mode: LaunchMode.externalApplication)) {
192
+                    throw "Can not launch url";
193
+                  }
178 194
                 } else if (action == "close") {
179 195
                   SystemChannels.platform.invokeMethod('SystemNavigator.pop');
180 196
                 }
@@ -183,7 +199,7 @@ Future<void> loginStatus(BuildContext context) async {
183 199
 
184 200
             // set up the AlertDialog
185 201
             AlertDialog alert = AlertDialog(
186
-              title: Text("Employee Self Service"),
202
+              title: Text(appName),
187 203
               content: Text(title + "\n" + message),
188 204
               actions: [okButton],
189 205
             );
@@ -191,6 +207,7 @@ Future<void> loginStatus(BuildContext context) async {
191 207
             // show the dialog
192 208
             showDialog(
193 209
               context: context,
210
+              barrierDismissible: false,
194 211
               builder: (BuildContext context) {
195 212
                 return alert;
196 213
               },
@@ -240,7 +257,7 @@ alertDialogFailedResponse(BuildContext context){
240 257
 
241 258
   // set up the AlertDialog
242 259
   AlertDialog alert = AlertDialog(
243
-    title: Text("Employee Self Service"),
260
+    title: Text(appName),
244 261
     content: Text("Server Response Error"),
245 262
     actions: [
246 263
       noButton,
@@ -251,6 +268,7 @@ alertDialogFailedResponse(BuildContext context){
251 268
   // show the dialog
252 269
   showDialog(
253 270
     context: context,
271
+    barrierDismissible: false,
254 272
     builder: (BuildContext context) {
255 273
       return alert;
256 274
     },

+ 1
- 1
lib/constants.dart Bestand weergeven

@@ -5,7 +5,7 @@ const kPrimaryLightColor = Color(0xFFF1E6FF);
5 5
 
6 6
 const double defaultPadding = 16.0;
7 7
 
8
-
8
+String appName = "Employee Self Service";
9 9
 //String baseURL = "http://10.209.8.49:8090";
10 10
 //String baseURL = "https://bisops.globalservice.co.id";
11 11
 String baseURL = "https://urp.myapps.id";

+ 52
- 2
lib/main.dart Bestand weergeven

@@ -1,20 +1,70 @@
1
+import 'package:firebase_core/firebase_core.dart';
2
+import 'package:firebase_messaging/firebase_messaging.dart';
1 3
 import 'package:flutter/material.dart';
2 4
 import 'package:flutter/services.dart';
3 5
 import 'package:hris_selfservice_mobile/Screens/Splash/splash_screen.dart';
4 6
 //import 'package:hris_selfservice_mobile/Screens/ForgotPassword/forgotPassword_screen.dart';
5 7
 import 'constants.dart';
8
+import 'firebase_options.dart';
9
+import 'dart:developer' as logDev;
10
+
11
+@pragma('vm:entry-point')
12
+Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
13
+  // If you're going to use other Firebase services in the background, such as Firestore,
14
+  // make sure you call `initializeApp` before using other Firebase services.
15
+  await Firebase.initializeApp();
16
+
17
+  print("Handling a background message: ${message.messageId}");
18
+}
19
+
20
+void main() async{
21
+  WidgetsFlutterBinding.ensureInitialized();
22
+  await Firebase.initializeApp(
23
+    options: DefaultFirebaseOptions.currentPlatform,
24
+  );
25
+
26
+  FirebaseMessaging messaging = FirebaseMessaging.instance;
27
+
28
+  NotificationSettings settings = await messaging.requestPermission(
29
+    alert: true,
30
+    announcement: false,
31
+    badge: true,
32
+    carPlay: false,
33
+    criticalAlert: false,
34
+    provisional: false,
35
+    sound: true,
36
+  );
37
+
38
+  print('User granted permission: ${settings.authorizationStatus}');
39
+
40
+
41
+  FirebaseMessaging.onMessage.listen((RemoteMessage remoteMessage) async {
42
+    Map<String, dynamic> data = remoteMessage.data;
43
+    logDev.log(data.toString(), name: "NOTIF Messaging");
44
+
45
+    String body = data['body'].toString();
46
+    logDev.log(body, name: "NOTIF Body");
47
+
48
+    print('Got a message whilst in the foreground!');
49
+    print('Message data: ${remoteMessage.data}');
50
+
51
+    if (remoteMessage.notification != null) {
52
+      print('Message also contained a notification: ${remoteMessage.notification}');
53
+    }
54
+  });
55
+
6 56
 
7
-void main() {
8 57
   SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
9 58
     statusBarColor: Colors.transparent,
10 59
   ));
60
+
61
+  FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
11 62
   runApp(MyApp());
12 63
 }
13 64
 
14 65
 class MyApp extends StatelessWidget {
15 66
   const MyApp({super.key});
16 67
 
17
-
18 68
   @override
19 69
   Widget build(BuildContext context) {
20 70
     return MaterialApp(

+ 0
- 0
lib/noInternetConnection.dart Bestand weergeven


+ 108
- 92
pubspec.lock Bestand weergeven

@@ -5,10 +5,10 @@ packages:
5 5
     dependency: transitive
6 6
     description:
7 7
       name: _flutterfire_internals
8
-      sha256: "6215ac7d00ed98300b72f45ed2b38c2ca841f9f4e6965fab33cbd591e45e4473"
8
+      sha256: "64fcb0dbca4386356386c085142fa6e79c00a3326ceaa778a2d25f5d9ba61441"
9 9
       url: "https://pub.dev"
10 10
     source: hosted
11
-    version: "1.0.13"
11
+    version: "1.0.16"
12 12
   animated_splash_screen:
13 13
     dependency: "direct main"
14 14
     description:
@@ -181,10 +181,10 @@ packages:
181 181
     dependency: "direct main"
182 182
     description:
183 183
       name: dio
184
-      sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
184
+      sha256: "9fdbf71baeb250fc9da847f6cb2052196f62c19906a3657adfc18631a667d316"
185 185
       url: "https://pub.dev"
186 186
     source: hosted
187
-    version: "4.0.6"
187
+    version: "5.0.0"
188 188
   double_back_to_close:
189 189
     dependency: "direct main"
190 190
     description:
@@ -229,10 +229,10 @@ packages:
229 229
     dependency: "direct main"
230 230
     description:
231 231
       name: firebase_core
232
-      sha256: be13e431c0c950f0fc66bdb67b41b8059121d7e7d8bbbc21fb59164892d561f8
232
+      sha256: fe30ac230f12f8836bb97e6e09197340d3c584526825b1746ea362a82e1e43f7
233 233
       url: "https://pub.dev"
234 234
     source: hosted
235
-    version: "2.5.0"
235
+    version: "2.7.0"
236 236
   firebase_core_platform_interface:
237 237
     dependency: transitive
238 238
     description:
@@ -245,34 +245,34 @@ packages:
245 245
     dependency: transitive
246 246
     description:
247 247
       name: firebase_core_web
248
-      sha256: "4b3a41410f3313bb95fd560aa5eb761b6ad65c185de772c72231e8b4aeed6d18"
248
+      sha256: "291fbcace608aca6c860652e1358ef89752be8cc3ef227f8bbcd1e62775b833a"
249 249
       url: "https://pub.dev"
250 250
     source: hosted
251
-    version: "2.1.1"
251
+    version: "2.2.1"
252 252
   firebase_messaging:
253 253
     dependency: "direct main"
254 254
     description:
255 255
       name: firebase_messaging
256
-      sha256: dbccddc62fef6f3745ba83062bfd1fbf2eb6a931db4c73d03f85c5772dfdec7f
256
+      sha256: "95f7565b8e992d2188cdd8dc5612330f7c309485fe425d3f9844f18e90741e3e"
257 257
       url: "https://pub.dev"
258 258
     source: hosted
259
-    version: "14.2.2"
259
+    version: "14.2.5"
260 260
   firebase_messaging_platform_interface:
261 261
     dependency: transitive
262 262
     description:
263 263
       name: firebase_messaging_platform_interface
264
-      sha256: "564a47ea76db9cd2d17e7d95790428ad3de9d0075795d14c4c901ba0bf518e1a"
264
+      sha256: c5e79e15d1018cafffea1a6e45249db0d6bc42dbe35178634c77488179880e79
265 265
       url: "https://pub.dev"
266 266
     source: hosted
267
-    version: "4.2.11"
267
+    version: "4.2.14"
268 268
   firebase_messaging_web:
269 269
     dependency: transitive
270 270
     description:
271 271
       name: firebase_messaging_web
272
-      sha256: "76291494583a003d4ce0d613c41cb87c58fab25773317daa66a245f537e1c3f7"
272
+      sha256: cd0cfcab7a63282049dec95a9955e7a487b5e580162310d12a82a10c0c32c546
273 273
       url: "https://pub.dev"
274 274
     source: hosted
275
-    version: "3.2.12"
275
+    version: "3.2.15"
276 276
   flutter:
277 277
     dependency: "direct main"
278 278
     description: flutter
@@ -306,10 +306,10 @@ packages:
306 306
     dependency: transitive
307 307
     description:
308 308
       name: flutter_local_notifications_linux
309
-      sha256: "8f6c1611e0c4a88a382691a97bb3c3feb24cc0c0b54152b8b5fb7ffb837f7fbf"
309
+      sha256: ccb08b93703aeedb58856e5637450bf3ffec899adb66dc325630b68994734b89
310 310
       url: "https://pub.dev"
311 311
     source: hosted
312
-    version: "3.0.0"
312
+    version: "3.0.0+1"
313 313
   flutter_local_notifications_platform_interface:
314 314
     dependency: transitive
315 315
     description:
@@ -346,10 +346,10 @@ packages:
346 346
     dependency: transitive
347 347
     description:
348 348
       name: flutter_plugin_android_lifecycle
349
-      sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b"
349
+      sha256: "4bef634684b2c7f3468c77c766c831229af829a0cd2d4ee6c1b99558bd14e5d2"
350 350
       url: "https://pub.dev"
351 351
     source: hosted
352
-    version: "2.0.7"
352
+    version: "2.0.8"
353 353
   flutter_polyline_points:
354 354
     dependency: "direct main"
355 355
     description:
@@ -370,10 +370,10 @@ packages:
370 370
     dependency: "direct main"
371 371
     description:
372 372
       name: flutter_svg
373
-      sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2"
373
+      sha256: "97c5b291b4fd34ae4f55d6a4c05841d4d0ed94952e033c5a6529e1b47b4d2a29"
374 374
       url: "https://pub.dev"
375 375
     source: hosted
376
-    version: "1.1.6"
376
+    version: "2.0.2"
377 377
   flutter_test:
378 378
     dependency: "direct dev"
379 379
     description: flutter
@@ -396,10 +396,10 @@ packages:
396 396
     dependency: "direct main"
397 397
     description:
398 398
       name: fluttertoast
399
-      sha256: "774fa28b07f3a82c93596bc137be33189fec578ed3447a93a5a11c93435de394"
399
+      sha256: "2f9c4d3f4836421f7067a28f8939814597b27614e021da9d63e5d3fb6e212d25"
400 400
       url: "https://pub.dev"
401 401
     source: hosted
402
-    version: "8.1.3"
402
+    version: "8.2.1"
403 403
   focus_detector:
404 404
     dependency: "direct main"
405 405
     description:
@@ -484,10 +484,10 @@ packages:
484 484
     dependency: "direct main"
485 485
     description:
486 486
       name: google_fonts
487
-      sha256: "8f099045e2f2a30e4d4d0a35f40c6bc941a8f2ca0e10ad9d214ee9edd3f37483"
487
+      sha256: "927573f2e8a8d65c17931e21918ad0ab0666b1b636537de7c4932bdb487b190f"
488 488
       url: "https://pub.dev"
489 489
     source: hosted
490
-    version: "3.0.1"
490
+    version: "4.0.3"
491 491
   http:
492 492
     dependency: "direct main"
493 493
     description:
@@ -540,42 +540,42 @@ packages:
540 540
     dependency: "direct main"
541 541
     description:
542 542
       name: image_picker
543
-      sha256: f98d76672d309c8b7030c323b3394669e122d52b307d2bbd8d06bd70f5b2aabe
543
+      sha256: "22207768556b82d55ec70166824350fee32298732d5efa4d6e756f848f51f66a"
544 544
       url: "https://pub.dev"
545 545
     source: hosted
546
-    version: "0.8.6+1"
546
+    version: "0.8.6+3"
547 547
   image_picker_android:
548 548
     dependency: transitive
549 549
     description:
550 550
       name: image_picker_android
551
-      sha256: "385f12ee9c7288575572c7873a332016ec45ebd092e1c2f6bd421b4a9ad21f1d"
551
+      sha256: "68d067baf7f6e401b1124ee83dd6967e67847314250fd68012aab34a69beb344"
552 552
       url: "https://pub.dev"
553 553
     source: hosted
554
-    version: "0.8.5+6"
554
+    version: "0.8.5+7"
555 555
   image_picker_for_web:
556 556
     dependency: transitive
557 557
     description:
558 558
       name: image_picker_for_web
559
-      sha256: "7d319fb74955ca46d9bf7011497860e3923bb67feebcf068f489311065863899"
559
+      sha256: "66fc6e3877bbde82c33d122f3588777c3784ac5bd7d1cdd79213ef7aecb85b34"
560 560
       url: "https://pub.dev"
561 561
     source: hosted
562
-    version: "2.1.10"
562
+    version: "2.1.11"
563 563
   image_picker_ios:
564 564
     dependency: transitive
565 565
     description:
566 566
       name: image_picker_ios
567
-      sha256: "8ffb14b43713d7c43fb21299cc18181cc5b39bd3ea1cc427a085c6400fe5aa52"
567
+      sha256: "39aa70b5f1e5e7c94585b9738632d5fdb764a5655e40cd9e7b95fbd2fc50c519"
568 568
       url: "https://pub.dev"
569 569
     source: hosted
570
-    version: "0.8.6+7"
570
+    version: "0.8.6+9"
571 571
   image_picker_platform_interface:
572 572
     dependency: transitive
573 573
     description:
574 574
       name: image_picker_platform_interface
575
-      sha256: "7cef2f28f4f2fef99180f636c3d446b4ccbafd6ba0fad2adc9a80c4040f656b8"
575
+      sha256: "1991219d9dbc42a99aff77e663af8ca51ced592cd6685c9485e3458302d3d4f8"
576 576
       url: "https://pub.dev"
577 577
     source: hosted
578
-    version: "2.6.2"
578
+    version: "2.6.3"
579 579
   internet_connection_checker:
580 580
     dependency: "direct main"
581 581
     description:
@@ -588,10 +588,10 @@ packages:
588 588
     dependency: "direct main"
589 589
     description:
590 590
       name: intl
591
-      sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
591
+      sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
592 592
       url: "https://pub.dev"
593 593
     source: hosted
594
-    version: "0.17.0"
594
+    version: "0.18.0"
595 595
   js:
596 596
     dependency: transitive
597 597
     description:
@@ -720,14 +720,6 @@ packages:
720 720
       url: "https://pub.dev"
721 721
     source: hosted
722 722
     version: "1.8.2"
723
-  path_drawing:
724
-    dependency: transitive
725
-    description:
726
-      name: path_drawing
727
-      sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977
728
-      url: "https://pub.dev"
729
-    source: hosted
730
-    version: "1.0.1"
731 723
   path_parsing:
732 724
     dependency: transitive
733 725
     description:
@@ -740,50 +732,50 @@ packages:
740 732
     dependency: transitive
741 733
     description:
742 734
       name: path_provider
743
-      sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95
735
+      sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9"
744 736
       url: "https://pub.dev"
745 737
     source: hosted
746
-    version: "2.0.12"
738
+    version: "2.0.13"
747 739
   path_provider_android:
748 740
     dependency: transitive
749 741
     description:
750 742
       name: path_provider_android
751
-      sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e
743
+      sha256: "7623b7d4be0f0f7d9a8b5ee6879fc13e4522d4c875ab86801dee4af32b54b83e"
752 744
       url: "https://pub.dev"
753 745
     source: hosted
754
-    version: "2.0.22"
746
+    version: "2.0.23"
755 747
   path_provider_foundation:
756 748
     dependency: transitive
757 749
     description:
758 750
       name: path_provider_foundation
759
-      sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74"
751
+      sha256: eec003594f19fe2456ea965ae36b3fc967bc5005f508890aafe31fa75e41d972
760 752
       url: "https://pub.dev"
761 753
     source: hosted
762
-    version: "2.1.1"
754
+    version: "2.1.2"
763 755
   path_provider_linux:
764 756
     dependency: transitive
765 757
     description:
766 758
       name: path_provider_linux
767
-      sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9"
759
+      sha256: "525ad5e07622d19447ad740b1ed5070031f7a5437f44355ae915ff56e986429a"
768 760
       url: "https://pub.dev"
769 761
     source: hosted
770
-    version: "2.1.8"
762
+    version: "2.1.9"
771 763
   path_provider_platform_interface:
772 764
     dependency: transitive
773 765
     description:
774 766
       name: path_provider_platform_interface
775
-      sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76
767
+      sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
776 768
       url: "https://pub.dev"
777 769
     source: hosted
778
-    version: "2.0.5"
770
+    version: "2.0.6"
779 771
   path_provider_windows:
780 772
     dependency: transitive
781 773
     description:
782 774
       name: path_provider_windows
783
-      sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c
775
+      sha256: "642ddf65fde5404f83267e8459ddb4556316d3ee6d511ed193357e25caa3632d"
784 776
       url: "https://pub.dev"
785 777
     source: hosted
786
-    version: "2.1.3"
778
+    version: "2.1.4"
787 779
   petitparser:
788 780
     dependency: transitive
789 781
     description:
@@ -804,10 +796,10 @@ packages:
804 796
     dependency: transitive
805 797
     description:
806 798
       name: plugin_platform_interface
807
-      sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a
799
+      sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
808 800
       url: "https://pub.dev"
809 801
     source: hosted
810
-    version: "2.1.3"
802
+    version: "2.1.4"
811 803
   pointycastle:
812 804
     dependency: transitive
813 805
     description:
@@ -876,58 +868,58 @@ packages:
876 868
     dependency: "direct main"
877 869
     description:
878 870
       name: shared_preferences
879
-      sha256: "5949029e70abe87f75cfe59d17bf5c397619c4b74a099b10116baeb34786fad9"
871
+      sha256: ee6257848f822b8481691f20c3e6d2bfee2e9eccb2a3d249907fcfb198c55b41
880 872
       url: "https://pub.dev"
881 873
     source: hosted
882
-    version: "2.0.17"
874
+    version: "2.0.18"
883 875
   shared_preferences_android:
884 876
     dependency: transitive
885 877
     description:
886 878
       name: shared_preferences_android
887
-      sha256: "955e9736a12ba776bdd261cf030232b30eadfcd9c79b32a3250dd4a494e8c8f7"
879
+      sha256: a51a4f9375097f94df1c6e0a49c0374440d31ab026b59d58a7e7660675879db4
888 880
       url: "https://pub.dev"
889 881
     source: hosted
890
-    version: "2.0.15"
882
+    version: "2.0.16"
891 883
   shared_preferences_foundation:
892 884
     dependency: transitive
893 885
     description:
894 886
       name: shared_preferences_foundation
895
-      sha256: "2b55c18636a4edc529fa5cd44c03d3f3100c00513f518c5127c951978efcccd0"
887
+      sha256: "6b84fdf06b32bb336f972d373cd38b63734f3461ba56ac2ba01b56d052796259"
896 888
       url: "https://pub.dev"
897 889
     source: hosted
898
-    version: "2.1.3"
890
+    version: "2.1.4"
899 891
   shared_preferences_linux:
900 892
     dependency: transitive
901 893
     description:
902 894
       name: shared_preferences_linux
903
-      sha256: f8ea038aa6da37090093974ebdcf4397010605fd2ff65c37a66f9d28394cb874
895
+      sha256: d7fb71e6e20cd3dfffcc823a28da3539b392e53ed5fc5c2b90b55fdaa8a7e8fa
904 896
       url: "https://pub.dev"
905 897
     source: hosted
906
-    version: "2.1.3"
898
+    version: "2.1.4"
907 899
   shared_preferences_platform_interface:
908 900
     dependency: transitive
909 901
     description:
910 902
       name: shared_preferences_platform_interface
911
-      sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3
903
+      sha256: "824bfd02713e37603b2bdade0842e47d56e7db32b1dcdd1cae533fb88e2913fc"
912 904
       url: "https://pub.dev"
913 905
     source: hosted
914
-    version: "2.1.0"
906
+    version: "2.1.1"
915 907
   shared_preferences_web:
916 908
     dependency: transitive
917 909
     description:
918 910
       name: shared_preferences_web
919
-      sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958
911
+      sha256: "6737b757e49ba93de2a233df229d0b6a87728cea1684da828cbc718b65dcf9d7"
920 912
       url: "https://pub.dev"
921 913
     source: hosted
922
-    version: "2.0.4"
914
+    version: "2.0.5"
923 915
   shared_preferences_windows:
924 916
     dependency: transitive
925 917
     description:
926 918
       name: shared_preferences_windows
927
-      sha256: "5eaf05ae77658d3521d0e993ede1af962d4b326cd2153d312df716dc250f00c9"
919
+      sha256: bd014168e8484837c39ef21065b78f305810ceabc1d4f90be6e3b392ce81b46d
928 920
       url: "https://pub.dev"
929 921
     source: hosted
930
-    version: "2.1.3"
922
+    version: "2.1.4"
931 923
   sky_engine:
932 924
     dependency: transitive
933 925
     description: flutter
@@ -993,10 +985,10 @@ packages:
993 985
     dependency: "direct main"
994 986
     description:
995 987
       name: transparent_image
996
-      sha256: e566a616922a781489f4d91cc939b1b3203b6e4a093317805f2f82f0bb0f8dec
988
+      sha256: e8991d955a2094e197ca24c645efec2faf4285772a4746126ca12875e54ca02f
997 989
       url: "https://pub.dev"
998 990
     source: hosted
999
-    version: "2.0.0"
991
+    version: "2.0.1"
1000 992
   tuple:
1001 993
     dependency: "direct main"
1002 994
     description:
@@ -1025,66 +1017,90 @@ packages:
1025 1017
     dependency: "direct main"
1026 1018
     description:
1027 1019
       name: url_launcher
1028
-      sha256: e8f2efc804810c0f2f5b485f49e7942179f56eabcfe81dce3387fec4bb55876b
1020
+      sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e"
1029 1021
       url: "https://pub.dev"
1030 1022
     source: hosted
1031
-    version: "6.1.9"
1023
+    version: "6.1.10"
1032 1024
   url_launcher_android:
1033 1025
     dependency: transitive
1034 1026
     description:
1035 1027
       name: url_launcher_android
1036
-      sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1"
1028
+      sha256: "1f4d9ebe86f333c15d318f81dcdc08b01d45da44af74552608455ebdc08d9732"
1037 1029
       url: "https://pub.dev"
1038 1030
     source: hosted
1039
-    version: "6.0.23"
1031
+    version: "6.0.24"
1040 1032
   url_launcher_ios:
1041 1033
     dependency: transitive
1042 1034
     description:
1043 1035
       name: url_launcher_ios
1044
-      sha256: "0a5af0aefdd8cf820dd739886efb1637f1f24489900204f50984634c07a54815"
1036
+      sha256: c9cd648d2f7ab56968e049d4e9116f96a85517f1dd806b96a86ea1018a3a82e5
1045 1037
       url: "https://pub.dev"
1046 1038
     source: hosted
1047
-    version: "6.1.0"
1039
+    version: "6.1.1"
1048 1040
   url_launcher_linux:
1049 1041
     dependency: transitive
1050 1042
     description:
1051 1043
       name: url_launcher_linux
1052
-      sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc"
1044
+      sha256: e29039160ab3730e42f3d811dc2a6d5f2864b90a70fb765ea60144b03307f682
1053 1045
       url: "https://pub.dev"
1054 1046
     source: hosted
1055
-    version: "3.0.2"
1047
+    version: "3.0.3"
1056 1048
   url_launcher_macos:
1057 1049
     dependency: transitive
1058 1050
     description:
1059 1051
       name: url_launcher_macos
1060
-      sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094"
1052
+      sha256: "2dddb3291a57b074dade66b5e07e64401dd2487caefd4e9e2f467138d8c7eb06"
1061 1053
       url: "https://pub.dev"
1062 1054
     source: hosted
1063
-    version: "3.0.2"
1055
+    version: "3.0.3"
1064 1056
   url_launcher_platform_interface:
1065 1057
     dependency: transitive
1066 1058
     description:
1067 1059
       name: url_launcher_platform_interface
1068
-      sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6"
1060
+      sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370"
1069 1061
       url: "https://pub.dev"
1070 1062
     source: hosted
1071
-    version: "2.1.1"
1063
+    version: "2.1.2"
1072 1064
   url_launcher_web:
1073 1065
     dependency: transitive
1074 1066
     description:
1075 1067
       name: url_launcher_web
1076
-      sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0"
1068
+      sha256: "574cfbe2390666003c3a1d129bdc4574aaa6728f0c00a4829a81c316de69dd9b"
1077 1069
       url: "https://pub.dev"
1078 1070
     source: hosted
1079
-    version: "2.0.14"
1071
+    version: "2.0.15"
1080 1072
   url_launcher_windows:
1081 1073
     dependency: transitive
1082 1074
     description:
1083 1075
       name: url_launcher_windows
1084
-      sha256: b6217370f8eb1fd85c8890c539f5a639a01ab209a36db82c921ebeacefc7a615
1076
+      sha256: "97c9067950a0d09cbd93e2e3f0383d1403989362b97102fbf446473a48079a4b"
1085 1077
       url: "https://pub.dev"
1086 1078
     source: hosted
1087
-    version: "3.0.3"
1079
+    version: "3.0.4"
1080
+  vector_graphics:
1081
+    dependency: transitive
1082
+    description:
1083
+      name: vector_graphics
1084
+      sha256: "254348b40251c995cf8301ac715486c8cfa0a93b7fdc4dbd495a30f04db1fb44"
1085
+      url: "https://pub.dev"
1086
+    source: hosted
1087
+    version: "1.1.0"
1088
+  vector_graphics_codec:
1089
+    dependency: transitive
1090
+    description:
1091
+      name: vector_graphics_codec
1092
+      sha256: "143c290b762646c696c63be5d976bde7379ea892cb6868ddc5a17cbc56e71411"
1093
+      url: "https://pub.dev"
1094
+    source: hosted
1095
+    version: "1.1.0"
1096
+  vector_graphics_compiler:
1097
+    dependency: transitive
1098
+    description:
1099
+      name: vector_graphics_compiler
1100
+      sha256: "3190cc26d9ebda686bafb9721bb6a74c6d358700f4fc978a0f2cba6912daff86"
1101
+      url: "https://pub.dev"
1102
+    source: hosted
1103
+    version: "1.1.0"
1088 1104
   vector_math:
1089 1105
     dependency: "direct main"
1090 1106
     description:
@@ -1142,5 +1158,5 @@ packages:
1142 1158
     source: hosted
1143 1159
     version: "3.1.1"
1144 1160
 sdks:
1145
-  dart: ">=2.18.4 <3.0.0"
1146
-  flutter: ">=3.3.0"
1161
+  dart: ">=2.19.0-0 <3.0.0"
1162
+  flutter: ">=3.7.0-0"

+ 10
- 9
pubspec.yaml Bestand weergeven

@@ -31,12 +31,12 @@ environment:
31 31
 dependencies:
32 32
   flutter:
33 33
     sdk: flutter
34
-  google_fonts: ^3.0.1
34
+  google_fonts: ^4.0.3
35 35
 
36 36
   # The following adds the Cupertino Icons font to your application.
37 37
   # Use with the CupertinoIcons class for iOS style icons.
38 38
   cupertino_icons: ^1.0.2
39
-  flutter_svg: ^1.1.6
39
+  flutter_svg: ^2.0.1
40 40
   flutter_staggered_grid_view: ^0.6.2
41 41
   double_back_to_close: ^2.0.0
42 42
   animated_splash_screen: ^1.3.0
@@ -44,8 +44,8 @@ dependencies:
44 44
   fluttertoast: ^8.1.1
45 45
   #google_maps_flutter: ^2.2.1
46 46
   http: ^0.13.5
47
-  intl: ^0.17.0
48
-  dio: ^4.0.6
47
+  intl: ^0.18.0
48
+  dio: ^5.0.0
49 49
   get_it: ^7.2.0
50 50
   shared_preferences: ^2.0.15
51 51
   # device_information: ^0.0.4
@@ -54,7 +54,6 @@ dependencies:
54 54
   flutter_udid: ^2.0.1
55 55
   image_picker: ^0.8.6
56 56
   image_cropper: ^3.0.1
57
-  url_launcher: ^6.1.7
58 57
   #progress_dialog: ^1.2.4
59 58
   progress_dialog_null_safe: ^1.0.4
60 59
   #mapbox_gl: ^0.16.0
@@ -73,8 +72,8 @@ dependencies:
73 72
   async: ^2.9.0
74 73
   flutter_image: ^4.1.4
75 74
   vector_math: ^2.1.2
76
-  meta: ^1.1.0
77
-  collection: ^1.16.0
75
+  meta: ^1.8.0
76
+  collection: ^1.17.0
78 77
   flutter_map_marker_cluster: ^1.0.1
79 78
   flutter_polyline_points: ^1.0.0
80 79
   provider: ^6.0.5
@@ -82,9 +81,11 @@ dependencies:
82 81
   internet_connection_checker: ^1.0.0+1
83 82
   #plain_notification_token: ^0.0.4
84 83
   focus_detector: ^2.0.1
85
-  firebase_core: ^2.4.1
84
+  firebase_core: ^2.6.1
86 85
   flutter_local_notifications: ^13.0.0
87
-  firebase_messaging: ^14.1.3
86
+  firebase_messaging: ^14.2.4
87
+  url_launcher: ^6.1.9
88
+
88 89
 
89 90
 dev_dependencies:
90 91
   flutter_test:

Laden…
Annuleren
Opslaan