step 25 : upload ktp, qrcode string, edit data,
check token expired 10 menit dari expired_date
This commit is contained in:
@@ -32,7 +32,8 @@ Future<bool> isTokenExpired() async {
|
||||
|
||||
try {
|
||||
DateTime expiredDate = DateTime.parse(expireDateStr);
|
||||
DateTime batasExpired = expiredDate.subtract(Duration(minutes: 3));
|
||||
// DateTime batasExpired = expiredDate.subtract(Duration(minutes: 3));
|
||||
DateTime batasExpired = expiredDate.subtract(Duration(minutes: 10));
|
||||
DateTime now = DateTime.now();
|
||||
|
||||
final bool expired = now.isAfter(batasExpired);
|
||||
|
||||
@@ -4,6 +4,11 @@ class Constant {
|
||||
// static double designHeight = 1024;
|
||||
// static double designWidth = 1440;
|
||||
|
||||
// prosesAksi
|
||||
static String getRiwayat = "getRiwayat";
|
||||
static String postUploadFoto = "postUploadFoto";
|
||||
static String postEditScan = "postEditScan";
|
||||
|
||||
// base url
|
||||
static String baseURL = "http://devone.aplikasi.web.id/";
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:scanktpflutter/screen/no-login-scan/no_login_scan_screen.dart';
|
||||
import '../screen/no-login-home/no_login_home_screen.dart';
|
||||
import '../screen/no-login-scan/no_login_edit_scan_screen.dart';
|
||||
import '../screen/no-login-splash/no_login_splash_screen.dart';
|
||||
import '../screen/no-login/no_login_screen.dart';
|
||||
|
||||
@@ -119,6 +120,16 @@ class AppRoute {
|
||||
});
|
||||
}
|
||||
|
||||
if (settings.name == noLoginEditScanRoute) {
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
return MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
textScaler: TextScaler.linear(1.0), padding: EdgeInsets.all(0)),
|
||||
child: NoLoginEditScanScreen(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
return MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
|
||||
Reference in New Issue
Block a user