Sfoglia il codice sorgente

update lang & tombol wa: tahap 1

Yulian 2 mesi fa
parent
commit
b827178a1e

File diff suppressed because it is too large
+ 25 - 0
assets/iconsax/ar.svg


+ 5 - 0
assets/iconsax/de.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-de" viewBox="0 0 640 480">
+  <path fill="#fc0" d="M0 320h640v160H0z"/>
+  <path fill="#000001" d="M0 0h640v160H0z"/>
+  <path fill="red" d="M0 160h640v160H0z"/>
+</svg>

+ 7 - 0
assets/iconsax/en.svg

@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-gb" viewBox="0 0 640 480">
+  <path fill="#012169" d="M0 0h640v480H0z"/>
+  <path fill="#FFF" d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z"/>
+  <path fill="#C8102E" d="m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z"/>
+  <path fill="#FFF" d="M241 0v480h160V0zM0 160v160h640V160z"/>
+  <path fill="#C8102E" d="M0 193v96h640v-96zM273 0v480h96V0z"/>
+</svg>

+ 5 - 0
assets/iconsax/fr.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-fr" viewBox="0 0 640 480">
+  <path fill="#fff" d="M0 0h640v480H0z"/>
+  <path fill="#000091" d="M0 0h213.3v480H0z"/>
+  <path fill="#e1000f" d="M426.7 0H640v480H426.7z"/>
+</svg>

+ 25 - 0
assets/iconsax/hi.svg

@@ -0,0 +1,25 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="flag-icons-in" viewBox="0 0 640 480">
+  <path fill="#f93" d="M0 0h640v160H0z"/>
+  <path fill="#fff" d="M0 160h640v160H0z"/>
+  <path fill="#128807" d="M0 320h640v160H0z"/>
+  <g transform="matrix(3.2 0 0 3.2 320 240)">
+    <circle r="20" fill="#008"/>
+    <circle r="17.5" fill="#fff"/>
+    <circle r="3.5" fill="#008"/>
+    <g id="in-d">
+      <g id="in-c">
+        <g id="in-b">
+          <g id="in-a" fill="#008">
+            <circle r=".9" transform="rotate(7.5 -8.8 133.5)"/>
+            <path d="M0 17.5.6 7 0 2l-.6 5z"/>
+          </g>
+          <use xlink:href="#in-a" width="100%" height="100%" transform="rotate(15)"/>
+        </g>
+        <use xlink:href="#in-b" width="100%" height="100%" transform="rotate(30)"/>
+      </g>
+      <use xlink:href="#in-c" width="100%" height="100%" transform="rotate(60)"/>
+    </g>
+    <use xlink:href="#in-d" width="100%" height="100%" transform="rotate(120)"/>
+    <use xlink:href="#in-d" width="100%" height="100%" transform="rotate(-120)"/>
+  </g>
+</svg>

+ 4 - 0
assets/iconsax/id.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-id" viewBox="0 0 640 480">
+  <path fill="#e70011" d="M0 0h640v240H0Z"/>
+  <path fill="#fff" d="M0 240h640v240H0Z"/>
+</svg>

+ 11 - 0
assets/iconsax/ja.svg

@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-jp" viewBox="0 0 640 480">
+  <defs>
+    <clipPath id="jp-a">
+      <path fill-opacity=".7" d="M-88 32h640v480H-88z"/>
+    </clipPath>
+  </defs>
+  <g fill-rule="evenodd" stroke-width="1pt" clip-path="url(#jp-a)" transform="translate(88 -32)">
+    <path fill="#fff" d="M-128 32h720v480h-720z"/>
+    <circle cx="523.1" cy="344.1" r="194.9" fill="#bc002d" transform="translate(-168.4 8.6)scale(.76554)"/>
+  </g>
+</svg>

+ 24 - 0
assets/iconsax/ko.svg

@@ -0,0 +1,24 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="flag-icons-kr" viewBox="0 0 640 480">
+  <defs>
+    <clipPath id="kr-a">
+      <path fill-opacity=".7" d="M-95.8-.4h682.7v512H-95.8z"/>
+    </clipPath>
+  </defs>
+  <g fill-rule="evenodd" clip-path="url(#kr-a)" transform="translate(89.8 .4)scale(.9375)">
+    <path fill="#fff" d="M-95.8-.4H587v512H-95.8Z"/>
+    <g transform="rotate(-56.3 361.6 -101.3)scale(10.66667)">
+      <g id="kr-c">
+        <path id="kr-b" fill="#000001" d="M-6-26H6v2H-6Zm0 3H6v2H-6Zm0 3H6v2H-6Z"/>
+        <use xlink:href="#kr-b" width="100%" height="100%" y="44"/>
+      </g>
+      <path stroke="#fff" d="M0 17v10"/>
+      <path fill="#cd2e3a" d="M0-12a12 12 0 0 1 0 24Z"/>
+      <path fill="#0047a0" d="M0-12a12 12 0 0 0 0 24A6 6 0 0 0 0 0Z"/>
+      <circle cy="-6" r="6" fill="#cd2e3a"/>
+    </g>
+    <g transform="rotate(-123.7 191.2 62.2)scale(10.66667)">
+      <use xlink:href="#kr-c" width="100%" height="100%"/>
+      <path stroke="#fff" d="M0-23.5v3M0 17v3.5m0 3v3"/>
+    </g>
+  </g>
+</svg>

+ 5 - 0
assets/iconsax/nl.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-nl" viewBox="0 0 640 480">
+  <path fill="#ae1c28" d="M0 0h640v160H0z"/>
+  <path fill="#fff" d="M0 160h640v160H0z"/>
+  <path fill="#21468b" d="M0 320h640v160H0z"/>
+</svg>

File diff suppressed because it is too large
+ 2 - 0
assets/iconsax/phone-circle.svg


+ 25 - 0
assets/iconsax/phone-number.svg

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg height="800px" width="800px" version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 
+	 viewBox="0 0 512 512"  xml:space="preserve">
+<style type="text/css">
+	.st0{fill:#000000;}
+</style>
+<g>
+	<path class="st0" d="M255.998,0.002C114.606,0.012,0.01,114.604,0,256c0.01,141.406,114.65,255.328,255.926,255.998h0.334
+		l0.297-0.009c27.124,0.038,49.507-8.527,64.961-22.594c15.468-14.01,23.727-33.254,23.708-52.736
+		c0.02-9.148-1.914-18.306-5.521-27.024c6.086-3.464,10.143-6.612,11.301-7.444c4.152-2.957,16-18.766,7.693-31.79
+		c-8.344-13.014-38.042-42.678-46.152-47.702c-8.086-5.015-21.598-0.124-28.105,9.426c-6.526,9.55-11.674,6.689-11.674,6.689
+		s-18.516-14.957-44.124-66.621c-25.607-51.694-26.263-75.454-26.263-75.454s0.833-5.847,12.388-5.263
+		c11.53,0.621,23.598-7.168,24.516-16.66c0.928-9.464-4.698-51.091-10-65.598c-5.316-14.516-25.062-14.65-29.928-13.138
+		c-4.89,1.502-55.033,13.712-59.014,66.21c-3.966,52.506,9.565,100.18,28.943,139.309c19.387,39.119,49.128,78.765,93.3,107.406
+		c17.89,11.598,35.058,13.1,49.493,10.67c2.483,5.54,3.718,11.291,3.746,16.985c-0.028,11.292-4.621,22.354-14.066,30.966
+		c-9.469,8.564-24.071,14.928-45.2,14.967l-0.516,0.009C130.797,481.96,29.387,381.09,29.397,256
+		c0.01-62.621,25.339-119.186,66.367-160.237c41.053-41.023,97.612-66.354,160.234-66.364c62.621,0.01,119.181,25.34,160.232,66.364
+		c41.033,41.052,66.354,97.606,66.373,160.237c-0.01,38.67-9.666,74.966-26.698,106.784c-9.531,17.837-21.397,34.23-35.177,48.812
+		c-5.569,5.905-5.301,15.206,0.594,20.776c5.894,5.578,15.205,5.32,20.784-0.584c15.54-16.46,28.937-34.976,39.712-55.139
+		C501.071,340.717,512,299.589,512,256C511.98,114.604,397.389,0.012,255.998,0.002z"/>
+</g>
+</svg>

+ 11 - 0
assets/iconsax/zh.svg

@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="flag-icons-cn" viewBox="0 0 640 480">
+  <defs>
+    <path id="cn-a" fill="#ff0" d="M-.6.8 0-1 .6.8-1-.3h2z"/>
+  </defs>
+  <path fill="#ee1c25" d="M0 0h640v480H0z"/>
+  <use xlink:href="#cn-a" width="30" height="20" transform="matrix(71.9991 0 0 72 120 120)"/>
+  <use xlink:href="#cn-a" width="30" height="20" transform="matrix(-12.33562 -20.5871 20.58684 -12.33577 240.3 48)"/>
+  <use xlink:href="#cn-a" width="30" height="20" transform="matrix(-3.38573 -23.75998 23.75968 -3.38578 288 95.8)"/>
+  <use xlink:href="#cn-a" width="30" height="20" transform="matrix(6.5991 -23.0749 23.0746 6.59919 288 168)"/>
+  <use xlink:href="#cn-a" width="30" height="20" transform="matrix(14.9991 -18.73557 18.73533 14.99929 240 216)"/>
+</svg>

BIN
assets/image/icon/call.png


BIN
assets/image/icon/contact_us.png


BIN
assets/image/icon/online.png


+ 12 - 4
lib/app_router.dart

@@ -1,10 +1,8 @@
 import 'package:auto_route/auto_route.dart';
 import 'package:flutter/foundation.dart';
-// import 'package:flutter_native_splash/flutter_native_splash.dart';
 import 'package:telnow_mobile_new/app_router.gr.dart';
 import 'package:telnow_mobile_new/src/api/api_auth_provider.dart';
 import 'package:telnow_mobile_new/src/injector/injector.dart';
-import 'package:telnow_mobile_new/src/layouts/auth/end_session.dart';
 import 'package:telnow_mobile_new/src/storage/sharedpreferences/shared_preferences_manager.dart';
 import 'package:telnow_mobile_new/src/utils/U.dart';
 
@@ -24,6 +22,8 @@ class AppRouter extends RootStackRouter {
         path: '/app/:pid', page: HomeGuardRoute.page, guards: appGuards,
         children: [
           AutoRoute(path: 'login', page: LoginRoute.page, guards: loginGuards, initial: true),
+          //TODO: tambah pengecekan sv disini
+          AutoRoute(path: 'landing-page', page: LandingRoute.page,),
           AutoRoute(path: 'loginme', page: AutoLoginRoute.page, guards: loginGuards),
           AutoRoute(path: 'license', page: ErrorRoute.page),
           AutoRoute(
@@ -58,7 +58,10 @@ class AppRouter extends RootStackRouter {
       var pid;
       bool stb = false;
 
-      rawPid = vRedirector.pathParams.getString('pid');
+      if(vRedirector.params.isNotEmpty){
+        rawPid = vRedirector.params.getString('pid');
+      }
+
       try {
         pid = Uri.decodeComponent(rawPid);
       } catch (e) {
@@ -119,7 +122,12 @@ class AppRouter extends RootStackRouter {
 
   List<AutoRouteGuard> get loginGuards => [
     AutoRouteGuard.simple((resolver, router) async{
-      // print(router.currentUrl);
+      if(resolver.route.fragment.contains("/")){
+        if(resolver.route.fragment.split("/")[1] == 'landing'){
+          await resolver.redirectUntil(LandingRoute());
+        }
+      }
+
       router.removeLast();
       if (!_isValidVersion()) {
         router.pushPath('/app/${Uri.encodeComponent(U.getAccessCode()!)}/license');

+ 76 - 40
lib/app_router.gr.dart

@@ -9,28 +9,30 @@
 // coverage:ignore-file
 
 // ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'package:auto_route/auto_route.dart' as _i9;
+import 'package:auto_route/auto_route.dart' as _i10;
+import 'package:flutter/material.dart' as _i11;
 import 'package:telnow_mobile_new/main.dart' as _i6;
 import 'package:telnow_mobile_new/src/layouts/auth/change_code.dart' as _i3;
 import 'package:telnow_mobile_new/src/layouts/auth/end_session.dart' as _i4;
-import 'package:telnow_mobile_new/src/layouts/auth/login.dart' as _i7;
-import 'package:telnow_mobile_new/src/layouts/auth/qr.dart' as _i8;
+import 'package:telnow_mobile_new/src/layouts/auth/login.dart' as _i8;
+import 'package:telnow_mobile_new/src/layouts/auth/qr.dart' as _i9;
 import 'package:telnow_mobile_new/src/layouts/components/auto_login.dart'
     as _i2;
 import 'package:telnow_mobile_new/src/layouts/components/error_page.dart'
     as _i5;
 import 'package:telnow_mobile_new/src/layouts/components/responsive.dart'
     as _i1;
+import 'package:telnow_mobile_new/src/layouts/landing/landing_page.dart' as _i7;
 
 /// generated route for
 /// [_i1.AccountResponsive]
-class AccountResponsive extends _i9.PageRouteInfo<void> {
-  const AccountResponsive({List<_i9.PageRouteInfo>? children})
+class AccountResponsive extends _i10.PageRouteInfo<void> {
+  const AccountResponsive({List<_i10.PageRouteInfo>? children})
     : super(AccountResponsive.name, initialChildren: children);
 
   static const String name = 'AccountResponsive';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return const _i1.AccountResponsive();
@@ -40,13 +42,13 @@ class AccountResponsive extends _i9.PageRouteInfo<void> {
 
 /// generated route for
 /// [_i1.AppResponsive]
-class AppResponsive extends _i9.PageRouteInfo<void> {
-  const AppResponsive({List<_i9.PageRouteInfo>? children})
+class AppResponsive extends _i10.PageRouteInfo<void> {
+  const AppResponsive({List<_i10.PageRouteInfo>? children})
     : super(AppResponsive.name, initialChildren: children);
 
   static const String name = 'AppResponsive';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return const _i1.AppResponsive();
@@ -56,13 +58,13 @@ class AppResponsive extends _i9.PageRouteInfo<void> {
 
 /// generated route for
 /// [_i2.AutoLoginPage]
-class AutoLoginRoute extends _i9.PageRouteInfo<void> {
-  const AutoLoginRoute({List<_i9.PageRouteInfo>? children})
+class AutoLoginRoute extends _i10.PageRouteInfo<void> {
+  const AutoLoginRoute({List<_i10.PageRouteInfo>? children})
     : super(AutoLoginRoute.name, initialChildren: children);
 
   static const String name = 'AutoLoginRoute';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return _i2.AutoLoginPage();
@@ -72,13 +74,13 @@ class AutoLoginRoute extends _i9.PageRouteInfo<void> {
 
 /// generated route for
 /// [_i3.ChangeCodePage]
-class ChangeCodeRoute extends _i9.PageRouteInfo<void> {
-  const ChangeCodeRoute({List<_i9.PageRouteInfo>? children})
+class ChangeCodeRoute extends _i10.PageRouteInfo<void> {
+  const ChangeCodeRoute({List<_i10.PageRouteInfo>? children})
     : super(ChangeCodeRoute.name, initialChildren: children);
 
   static const String name = 'ChangeCodeRoute';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return const _i3.ChangeCodePage();
@@ -88,13 +90,13 @@ class ChangeCodeRoute extends _i9.PageRouteInfo<void> {
 
 /// generated route for
 /// [_i4.EndSessionPage]
-class EndSessionRoute extends _i9.PageRouteInfo<void> {
-  const EndSessionRoute({List<_i9.PageRouteInfo>? children})
+class EndSessionRoute extends _i10.PageRouteInfo<void> {
+  const EndSessionRoute({List<_i10.PageRouteInfo>? children})
     : super(EndSessionRoute.name, initialChildren: children);
 
   static const String name = 'EndSessionRoute';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return const _i4.EndSessionPage();
@@ -104,11 +106,11 @@ class EndSessionRoute extends _i9.PageRouteInfo<void> {
 
 /// generated route for
 /// [_i5.ErrorPage]
-class ErrorRoute extends _i9.PageRouteInfo<ErrorRouteArgs> {
+class ErrorRoute extends _i10.PageRouteInfo<ErrorRouteArgs> {
   ErrorRoute({
     required dynamic code,
     required dynamic errMsg,
-    List<_i9.PageRouteInfo>? children,
+    List<_i10.PageRouteInfo>? children,
   }) : super(
          ErrorRoute.name,
          args: ErrorRouteArgs(code: code, errMsg: errMsg),
@@ -117,7 +119,7 @@ class ErrorRoute extends _i9.PageRouteInfo<ErrorRouteArgs> {
 
   static const String name = 'ErrorRoute';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       final args = data.argsAs<ErrorRouteArgs>();
@@ -141,13 +143,13 @@ class ErrorRouteArgs {
 
 /// generated route for
 /// [_i1.HistoryResponsive]
-class HistoryResponsive extends _i9.PageRouteInfo<void> {
-  const HistoryResponsive({List<_i9.PageRouteInfo>? children})
+class HistoryResponsive extends _i10.PageRouteInfo<void> {
+  const HistoryResponsive({List<_i10.PageRouteInfo>? children})
     : super(HistoryResponsive.name, initialChildren: children);
 
   static const String name = 'HistoryResponsive';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return const _i1.HistoryResponsive();
@@ -157,13 +159,13 @@ class HistoryResponsive extends _i9.PageRouteInfo<void> {
 
 /// generated route for
 /// [_i6.HomeGuardPage]
-class HomeGuardRoute extends _i9.PageRouteInfo<void> {
-  const HomeGuardRoute({List<_i9.PageRouteInfo>? children})
+class HomeGuardRoute extends _i10.PageRouteInfo<void> {
+  const HomeGuardRoute({List<_i10.PageRouteInfo>? children})
     : super(HomeGuardRoute.name, initialChildren: children);
 
   static const String name = 'HomeGuardRoute';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return const _i6.HomeGuardPage();
@@ -173,13 +175,13 @@ class HomeGuardRoute extends _i9.PageRouteInfo<void> {
 
 /// generated route for
 /// [_i1.HomeResponsive]
-class HomeResponsive extends _i9.PageRouteInfo<void> {
-  const HomeResponsive({List<_i9.PageRouteInfo>? children})
+class HomeResponsive extends _i10.PageRouteInfo<void> {
+  const HomeResponsive({List<_i10.PageRouteInfo>? children})
     : super(HomeResponsive.name, initialChildren: children);
 
   static const String name = 'HomeResponsive';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
       return const _i1.HomeResponsive();
@@ -188,33 +190,67 @@ class HomeResponsive extends _i9.PageRouteInfo<void> {
 }
 
 /// generated route for
-/// [_i7.LoginPage]
-class LoginRoute extends _i9.PageRouteInfo<void> {
-  const LoginRoute({List<_i9.PageRouteInfo>? children})
+/// [_i7.LandingPage]
+class LandingRoute extends _i10.PageRouteInfo<LandingRouteArgs> {
+  LandingRoute({_i11.Key? key, List<_i10.PageRouteInfo>? children})
+    : super(
+        LandingRoute.name,
+        args: LandingRouteArgs(key: key),
+        initialChildren: children,
+      );
+
+  static const String name = 'LandingRoute';
+
+  static _i10.PageInfo page = _i10.PageInfo(
+    name,
+    builder: (data) {
+      final args = data.argsAs<LandingRouteArgs>(
+        orElse: () => const LandingRouteArgs(),
+      );
+      return _i7.LandingPage(key: args.key);
+    },
+  );
+}
+
+class LandingRouteArgs {
+  const LandingRouteArgs({this.key});
+
+  final _i11.Key? key;
+
+  @override
+  String toString() {
+    return 'LandingRouteArgs{key: $key}';
+  }
+}
+
+/// generated route for
+/// [_i8.LoginPage]
+class LoginRoute extends _i10.PageRouteInfo<void> {
+  const LoginRoute({List<_i10.PageRouteInfo>? children})
     : super(LoginRoute.name, initialChildren: children);
 
   static const String name = 'LoginRoute';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
-      return const _i7.LoginPage();
+      return const _i8.LoginPage();
     },
   );
 }
 
 /// generated route for
-/// [_i8.NewQrPage]
-class NewQrRoute extends _i9.PageRouteInfo<void> {
-  const NewQrRoute({List<_i9.PageRouteInfo>? children})
+/// [_i9.NewQrPage]
+class NewQrRoute extends _i10.PageRouteInfo<void> {
+  const NewQrRoute({List<_i10.PageRouteInfo>? children})
     : super(NewQrRoute.name, initialChildren: children);
 
   static const String name = 'NewQrRoute';
 
-  static _i9.PageInfo page = _i9.PageInfo(
+  static _i10.PageInfo page = _i10.PageInfo(
     name,
     builder: (data) {
-      return const _i8.NewQrPage();
+      return const _i9.NewQrPage();
     },
   );
 }

+ 0 - 1
lib/main.dart

@@ -18,7 +18,6 @@ import 'package:quick_notify_2/quick_notify.dart';
 import 'package:shared_preferences/shared_preferences.dart';
 import 'package:telnow_mobile_new/src/api/api_auth_provider.dart';
 import 'package:telnow_mobile_new/src/injector/injector.dart';
-import 'package:telnow_mobile_new/src/layouts/components/template.dart';
 import 'package:telnow_mobile_new/src/layouts/mobile/history_forum.dart';
 import 'package:telnow_mobile_new/src/layouts/mobile/message_list.dart';
 import 'package:telnow_mobile_new/src/storage/sharedpreferences/shared_preferences_manager.dart';

+ 5 - 3
lib/src/api/api_auth_provider.dart

@@ -59,7 +59,7 @@ class ApiAuthProvider {
   init(){
     // print('ApiAuthProvider called');
     // print("U.getAccessCode() ==> ${U.getAccessCode()}");
-    isDebug = _sharedPreferencesManager.getBool(SharedPreferencesManager.keyIsDebug);
+    isDebug = _sharedPreferencesManager.getBool(SharedPreferencesManager.keyIsDebug)??false;
     if (_sharedPreferencesManager.isKeyExists(SharedPreferencesManager.keyAccessCode)! && _sharedPreferencesManager.isKeyExists(SharedPreferencesManager.keyBaseUrl)!) {
       baseUrl = U.decodeBase64Url(U.getBaseUrl()!);
       _dio.options.baseUrl = baseUrl + U.decodeBase64Url(Uri.decodeComponent(U.getAccessCode()!));
@@ -267,7 +267,7 @@ class ApiAuthProvider {
       );
       return response.data;
     } on DioException catch (error) {
-     print(error);
+     debugPrint('Error post: ${error.toString()}');
       if (error.response == null) {
         try {
           final result = await InternetAddress.lookup('google.com');
@@ -290,7 +290,9 @@ class ApiAuthProvider {
           showError(context, 'broadcastPermission'.tr());
         } else if(error.response?.data['message'] == 'request did not match informant rights'){
           showError(context, 'idNotMatch'.tr().replaceAll("#ID", data['user_id']));
-        } else if(error.response?.data['message'] == 'Informant user id not found.'){
+        } else if(error.response?.data['message'] == 'Informant user id not found.' ||
+            error.response?.data['message'] == 'invalid user informant requested'
+        ){
           showError(context, 'idNotFound'.tr());
         } else if(error.response?.data['message'] == 'You are not registered as receptionist or room attendant.'){
           showError(context, 'informantNotRegistered'.tr());

+ 2 - 2
lib/src/layouts/auth/login.dart

@@ -82,7 +82,7 @@ class _LoginPageState extends State<LoginPage> {
             child: Container(
               padding: EdgeInsets.fromLTRB(16, 100, 16, 16),
               width: MediaQuery.of(context).size.width,
-              height: kIsWeb && MediaQuery.of(context).size.height<700 ? 700 : MediaQuery.of(context).size.height,
+              height: kIsWeb && MediaQuery.of(context).size.height<720 ? 720 : MediaQuery.of(context).size.height,
               decoration: BoxDecoration(gradient: LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [primaryColor.withValues(alpha: 0.50), Colors.black.withValues(alpha: 0.91)])),
               child: SafeArea(
                 child: Column(
@@ -113,7 +113,7 @@ class _LoginPageState extends State<LoginPage> {
                                     width: double.infinity,
                                     margin: EdgeInsets.only(top: 40, bottom: 20),
                                     padding: EdgeInsets.symmetric(vertical: 16),
-                                    child: !loading?Text('buttonLogin'.tr(), style: TextStyle(color: Colors.white, fontSize: 17), textAlign: TextAlign.center):Center(
+                                    child: !loading ? Text('buttonLogin'.tr(), style: TextStyle(color: Colors.white, fontSize: 17), textAlign: TextAlign.center):Center(
                                       child: SizedBox(
                                         width: 22, height: 22, child: CircularProgressIndicator(color: Colors.white),
                                       ),

+ 37 - 35
lib/src/layouts/components/camera.dart

@@ -58,41 +58,43 @@ class _OpenCameraState extends State<OpenCamera> {
   @override
   Widget build(BuildContext context) {
     return Scaffold(
-        body: Container(
-          width: double.infinity, height: double.infinity,
-          child: Stack(children: [
-            (_cameraController.value.isInitialized) ? CameraPreview(_cameraController) : Container(color: Colors.black, child: const Center(child: CircularProgressIndicator())),
-            Align(
-                alignment: Alignment.bottomCenter,
-                child: Container(
-                  width: double.infinity,
-                  height: MediaQuery.of(context).size.height * 0.15,
-                  decoration: const BoxDecoration(color: Colors.black),
-                  child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
-                    Expanded(
-                        child: IconButton(
-                          padding: EdgeInsets.zero,
-                          iconSize: 30,
-                          icon: Icon(_isRearCameraSelected ? Icons.cameraswitch_outlined : Icons.cameraswitch_rounded, color: Colors.white),
-                          onPressed: () {
-                            setState(() => _isRearCameraSelected = !_isRearCameraSelected);
-                            initCamera(widget.cameras![_isRearCameraSelected ? 0 : 1]);
-                          },
-                        )
-                    ),
-                    Expanded(
-                        child: IconButton(
-                          onPressed: takePicture,
-                          iconSize: 60,
-                          padding: EdgeInsets.zero,
-                          constraints: const BoxConstraints(),
-                          icon: const Icon(Icons.circle, color: Colors.white),
-                        )
-                    ),
-                    const Spacer(),
-                  ]),
-                )),
-          ]),
+        body: SafeArea(
+          child: Container(
+            width: double.infinity, height: double.infinity,
+            child: Stack(children: [
+              (_cameraController.value.isInitialized) ? CameraPreview(_cameraController) : Container(color: Colors.black, child: const Center(child: CircularProgressIndicator())),
+              Align(
+                  alignment: Alignment.bottomCenter,
+                  child: Container(
+                    width: double.infinity,
+                    height: MediaQuery.of(context).size.height * 0.15,
+                    decoration: const BoxDecoration(color: Colors.black),
+                    child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
+                      Expanded(
+                          child: IconButton(
+                            padding: EdgeInsets.zero,
+                            iconSize: 30,
+                            icon: Icon(_isRearCameraSelected ? Icons.cameraswitch_outlined : Icons.cameraswitch_rounded, color: Colors.white),
+                            onPressed: () {
+                              setState(() => _isRearCameraSelected = !_isRearCameraSelected);
+                              initCamera(widget.cameras![_isRearCameraSelected ? 0 : 1]);
+                            },
+                          )
+                      ),
+                      Expanded(
+                          child: IconButton(
+                            onPressed: takePicture,
+                            iconSize: 60,
+                            padding: EdgeInsets.zero,
+                            constraints: const BoxConstraints(),
+                            icon: const Icon(Icons.circle, color: Colors.white),
+                          )
+                      ),
+                      const Spacer(),
+                    ]),
+                  )),
+            ]),
+          ),
         )
     );
   }

+ 4 - 2
lib/src/layouts/functions/request.dart

@@ -223,16 +223,18 @@ class RequestFunction{
 
       try{
         var res = await apiAuthProvider.postData('/api/receptionists/send/request', null, data, context);
-        // print("res ##> $res");
+        print("res ##> $res");
         if (res != null) {
           Future.delayed(Duration(seconds: 3), (){
             closeLoading(context);
-            navigateTo(context, U.webView(context)?WebReqSuccessPage(user: widget.user, ticketNo: res['ticketNo'], fromSearch: widget.fromSearch):MobReqSuccessPage(user: widget.user, ticketNo: res['ticketNo'], fromSearch: widget.fromSearch)).then((res){
+            navigateTo(context, U.webView(context) ? WebReqSuccessPage(user: widget.user, ticketNo: res['ticketNo'], fromSearch: widget.fromSearch) : MobReqSuccessPage(user: widget.user, ticketNo: res['ticketNo'], fromSearch: widget.fromSearch)).then((res){
               while (Navigator.canPop(context)){
                 Navigator.pop(context);
               }
             });
           });
+        } else {
+          closeLoading(context);
         }
       }catch(e){
         print("error: $e");

+ 321 - 0
lib/src/layouts/landing/landing_page.dart

@@ -0,0 +1,321 @@
+import 'dart:convert';
+import 'dart:typed_data';
+
+import 'package:auto_route/annotations.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:telnow_mobile_new/src/utils/U.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../../api/api_auth_provider.dart';
+
+@RoutePage()
+class LandingPage extends StatefulWidget {
+  const LandingPage({super.key});
+
+  @override
+  State<LandingPage> createState() => _LandingPageState();
+}
+
+class _LandingPageState extends State<LandingPage> {
+  final ApiAuthProvider _apiAuthProvider = ApiAuthProvider();
+  var data = {};
+  var lic = {};
+  var languages = [];
+  var promo = [];
+  bool isLoading = true;
+  String accessCode = '';
+  String locale = 'id';
+
+  getData() async{
+    try {
+      lic = await U.getLicense();
+      data = await _apiAuthProvider.getDataNoAuth('/api/landingPage/config');
+      promo = await _apiAuthProvider.getDataNoAuth('/api/landingPage/promo');
+      isLoading = false;
+      setState((){});
+    }catch(e){
+      print(e.toString());
+    }
+  }
+
+  setLang(List<dynamic> l){
+    if(l.isNotEmpty){
+      l.forEach((v){
+        languages.add({
+          "val": v,
+          "icon": '$v.svg',
+          'label': v.toUpperCase()
+        });
+      });
+    }
+  }
+
+  @override
+  void initState() {
+    // TODO: implement initState
+    accessCode = U.getAccessCode()!;
+    getData().then((t){
+      setLang(lic['_validLang']);
+    });
+    super.initState();
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    locale = context.locale.toString();
+    return isLoading ? Center(child: CircularProgressIndicator(),) : Scaffold(
+      appBar: AppBar(
+        backgroundColor: Colors.white,
+        foregroundColor: Colors.black,
+        title: Row(
+          children: [
+            Padding(
+              padding: EdgeInsets.symmetric(
+                  horizontal: 8.0, vertical: 8.0),
+              child: Image.network(getImageUrl(data['logo']), height: 36,),
+            ),
+            Text(data['title'], style: TextStyle(fontWeight: FontWeight.w600),),
+          ],
+        ),
+        actions: [
+          Container(
+            decoration: BoxDecoration(
+              // border: Border.all(),
+                borderRadius: BorderRadius.all(Radius.circular(12))
+            ),
+            padding: EdgeInsets.only(right: 16),
+            child: ddLang(context)
+          )
+        ],
+      ),
+      body: LayoutBuilder(
+          builder: (BuildContext context, constraint) {
+            return SingleChildScrollView(
+              child: Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  SizedBox(
+                    width: constraint.maxWidth,
+                    child: Image.network(getImageUrl(data['background-url'])),
+                  ),
+                  SizedBox(height: 24,),
+                  container(label(data['content']['title'][locale])),
+                  container(Text(data['content']['description'][locale])),
+                  promos(promo),
+                  cta(data['cta'], () => context.navigateToPath('/app/$accessCode/login')),
+                  connectUs(data)
+                ],
+              ),
+            );
+          }
+      ),
+    );
+  }
+
+  getByLang(String label){
+    String val = '';
+    switch (locale){
+      case 'id':
+        val = label;
+        break;
+      case 'en':
+        val = '${label}En';
+        break;
+      default:
+        val = '_$label${locale[0].toUpperCase()}${locale.substring(1)}';
+        break;
+    }
+    // print(val);
+    return val;
+  }
+
+  ddLang(BuildContext context){
+    String selectedValue = context.locale.toString();
+    List<dynamic> items = languages;
+
+    return DropdownButton<String>(
+      value: selectedValue,
+      elevation: 0,
+      underline: SizedBox(),
+      focusColor: Color(0x0000ffff),
+      items: items.map((item) {
+        return DropdownMenuItem<String>(
+          value: item['val'],
+          child: SizedBox(
+            width: 52,
+            child: Row(
+              children: [
+                SvgPicture.network(getImageUrl(item['icon']), width: 16, height: 16,),
+                // Image.network(getImage(item['icon']), width: 24, height: 24,),
+                SizedBox(width: 4,),
+                Text(item['label']),
+              ],
+            ),
+          ),
+        );
+      }).toList(),
+      onChanged: (newValue) {
+        // print(newValue);
+        context.setLocale(Locale(newValue!));
+        setState(() {
+          selectedValue = newValue;
+        });
+      },
+    );
+
+  }
+
+  getImageUrl<String>(String filename){
+    return '${_apiAuthProvider.baseUrl}${U.decodeBase64Url(Uri.decodeComponent(U.getAccessCode()!))}/assets/landingPage/images/$filename';
+  }
+
+  frameImg(String img){
+    return Container(
+      height: 240,
+      decoration: BoxDecoration(
+          image: DecorationImage(image: NetworkImage(img), fit: BoxFit.cover),
+          borderRadius: BorderRadius.all(Radius.circular(16))
+      ),
+    );
+  }
+
+  container(Widget child){
+    return Padding(
+      padding: EdgeInsets.symmetric(
+        vertical: 6,
+        horizontal: 16,
+      ),
+      child: child,
+    );
+  }
+
+  label(String txt, {double size = 24}){
+    return Text(
+      txt,
+      style: TextStyle(
+          fontWeight: FontWeight.w700,
+          fontSize: size
+      ),
+    );
+  }
+
+  promos(data){
+    return Column(
+      children: List.generate(data.length, (i){
+        return Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            SizedBox(height: 24,),
+            container(frameImg(data[i]['image'])),
+            container(label(data[i][getByLang('title')], size: 18)),
+            container(Text(data[i][getByLang('description')])),
+            SizedBox(height: 12,),
+          ],
+        );
+      }),
+    );
+  }
+
+  cta(d, cb){
+    var h = 220.0;
+    return Stack(
+      children: [
+        Container(
+          height: h,
+          decoration: BoxDecoration(
+            image: DecorationImage(image: NetworkImage(getImageUrl(d['image'])), fit: BoxFit.cover),
+          ),
+          // color: Colors.black.withValues(alpha: 0.5),
+        ),
+        Container(
+          height: h,
+          color: Colors.black.withValues(alpha: 0.5),
+        ),
+        Container(
+          padding: EdgeInsets.all(24.0),
+          height: h,
+          child: Column(
+            spacing: 8,
+            mainAxisAlignment: MainAxisAlignment.end,
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Text(
+                d['title'][locale],
+                style: TextStyle(
+                    color: Colors.white,
+                    fontSize: 20,
+                    fontWeight: FontWeight.w600
+                ),
+              ),
+              Text(d['description'][locale], style: TextStyle(color: Colors.white),),
+              SizedBox(height: 16,),
+              ElevatedButton(
+                style: ElevatedButton.styleFrom(
+                  padding: EdgeInsets.all(20),
+                  backgroundColor: Color(0xFFFFA800), // Background color of the button
+                  foregroundColor: Colors.white, // Color of the text and icon
+                ),
+                onPressed: cb,
+                child: Text(d['label'][locale]),
+              )
+            ],
+          ),
+        )
+      ],
+    );
+  }
+
+  connectUs(data){
+    var dt = data['link'];
+    return Padding(
+      padding: EdgeInsets.symmetric(vertical: 24, horizontal: 16),
+      child: Column(
+        crossAxisAlignment: CrossAxisAlignment.start,
+        children: [
+          Text(
+            data['contact'][locale],
+            style: TextStyle(
+                fontSize: 22,
+                fontWeight: FontWeight.w700
+            ),
+          ),
+          SizedBox(height: 24,),
+          Wrap(
+            runSpacing: 20.0,
+            children: List.generate(dt.length, (i){
+              return LayoutBuilder(builder: (BuildContext context, constraint){
+                return SizedBox(
+                  width: constraint.maxWidth/2-10,
+                  child: GestureDetector(
+                    onTap: dt[i]['url'] == '' ? (){} : () async {
+                      var url = Uri.parse(dt[i]['url']);
+                      await canLaunchUrl(url) ? await launchUrl(url) : print('Could not launch $url');
+                    },
+                    child: Row(
+                      children: [
+                        Image.network(getImageUrl(dt[i]['icon']), width: 24, height: 24,),
+                        SizedBox(width: 12,),
+                        Text(dt[i]['label'], style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),)
+                      ],
+                    ),
+                  ),
+                );
+              });
+            }),
+          ),
+          SizedBox(height: 24,),
+          Divider(),
+          Padding(
+            padding: EdgeInsets.only(top: 8),
+            child: Center(
+              child: Text(data['footer']),
+            ),
+          )
+        ],
+      ),
+    );
+  }
+}

+ 69 - 52
lib/src/layouts/mobile/menu_home.dart

@@ -67,67 +67,84 @@ class _MobHomePageState extends State<MobHomePage> with WidgetsBindingObserver {
   Widget build(BuildContext context) {
     return Provider.of<UserModule>(context).user().isNotEmpty?Scaffold(
       backgroundColor: backgroundColor,
-      appBar: PreferredSize(preferredSize: Size.fromHeight(0), child: AppBar(elevation: 0, backgroundColor: primaryColor)),
+      // appBar: PreferredSize(
+      //     preferredSize: Size.fromHeight(0),
+      //     child: AppBar(
+      //       elevation: 0,
+      //       backgroundColor: primaryColor,
+      //     )
+      // ),
       body: Column(
         children: [
           Container(
             width: double.infinity,
             color: primaryColor,
-            padding: EdgeInsets.fromLTRB(16, 8, 16, 8),
-            child: Column(
-              crossAxisAlignment: CrossAxisAlignment.start,
-              children: [
-                Text('${Provider.of<UserModule>(context).user()['name']}${(Provider.of<UserModule>(context).user()['guestName']!=null&&Provider.of<UserModule>(context).user()['guestName']!=''?' - ${Provider.of<UserModule>(context).user()['guestName']}':'')}', style: TextStyle(color: Colors.white, fontSize: 18), overflow: TextOverflow.ellipsis),
-                Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()] != null ? Text(Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()], style: TextStyle(color: Colors.white, fontSize: 14), overflow: TextOverflow.ellipsis) : Container(),
-                SizedBox(height: 16),
-                Row(
-                  children: [
-                    Expanded(
-                      child: GestureDetector(
-                        child: Container(
-                          padding: EdgeInsets.fromLTRB(20, 13, 20, 13),
-                          child: Row(
-                            children: [
-                              U.iconsax('search-normal-1', color: textColor),
-                              SizedBox(width: 13),
-                              Expanded(child: Text(Provider.of<UserModule>(context).profile()['searchText'][context.locale.toString()] != null ? Provider.of<UserModule>(context).profile()['searchText'][context.locale.toString()] : 'searchAsk'.tr(), style: TextStyle(color: textColor.withValues(alpha: 0.5), fontSize: 14), overflow: TextOverflow.ellipsis))
-                            ],
+            padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+            child: SafeArea(
+              child: Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  Row(
+                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                    children: [
+                      Text('${Provider.of<UserModule>(context).user()['name']}${(Provider.of<UserModule>(context).user()['guestName'] != null && Provider.of<UserModule>(context).user()['guestName'] != '' ? ' - ${Provider.of<UserModule>(context).user()['guestName']}' : '')}', style: TextStyle(color: Colors.white, fontSize: 18), overflow: TextOverflow.ellipsis),
+                      Row(
+                        children: [
+                          //TODO: tambah pengecekan server version disini
+                          GestureDetector(
+                            onTap: () => launchUrl(Uri.parse('https://wa.me/6285225076787')),
+                            child: U.iconsax('phone-number', color: Colors.white, size: 26.0)
                           ),
-                          decoration: BoxDecoration(
-                              color: Colors.white,
-                              borderRadius: BorderRadius.all(Radius.circular(50))
+                          SizedBox(width: 8),
+                          GestureDetector(
+                            child: Container(
+                              child: Stack(
+                                alignment: Alignment.topRight,
+                                children: [
+                                  U.iconsax('sms-notification', color: Colors.white, size: 32.0),
+                                  Provider.of<ServiceModule>(context).unreadMessage() ? Container(
+                                    width: 8, height: 8, margin: EdgeInsets.only(top: 1.3),
+                                    decoration: BoxDecoration(color: Colors.red, borderRadius: BorderRadius.all(Radius.circular(50))),
+                                  ):Container()
+                                ],
+                              ),
+                            ),
+                            onTap: ()=>navigateTo(context, MobMessageListPage(Provider.of<UserModule>(context, listen: false).user())),
+                          )
+                        ],
+                      )
+                    ],
+                  ),
+                  Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()] != null ? Text(Provider.of<UserModule>(context).profile()['greeting'][context.locale.toString()], style: TextStyle(color: Colors.white, fontSize: 14), overflow: TextOverflow.ellipsis) : Container(),
+                  SizedBox(height: 8),
+                  Row(
+                    children: [
+                      Expanded(
+                        child: GestureDetector(
+                          child: Container(
+                            padding: EdgeInsets.symmetric(horizontal: 20, vertical: 12,),
+                            decoration: BoxDecoration(
+                                color: Colors.white,
+                                borderRadius: BorderRadius.all(Radius.circular(50))
+                            ),
+                            child: Row(
+                              children: [
+                                U.iconsax('search-normal-1', color: textColor),
+                                SizedBox(width: 13),
+                                Expanded(child: Text(Provider.of<UserModule>(context).profile()['searchText'][context.locale.toString()] != null ? Provider.of<UserModule>(context).profile()['searchText'][context.locale.toString()] : 'searchAsk'.tr(), style: TextStyle(color: textColor.withValues(alpha: 0.5), fontSize: 14), overflow: TextOverflow.ellipsis))
+                              ],
+                            ),
                           ),
-                        ),
-                        onTap: () => navigateTo(context, MobReqSelectPage(user: Provider.of<UserModule>(context, listen: false).user(), title: 'search'.tr(), scope: Provider.of<ServiceModule>(context, listen: false).scoopeValue(), placeholder: Provider.of<UserModule>(context, listen: false).profile()['searchText'][context.locale.toString()] != null ? Provider.of<UserModule>(context, listen: false).profile()['searchText'][context.locale.toString()] : 'searchAsk'.tr())).then((val){
-                          val = val??true;
-                          if(val) homeFunc.getFrequentlyRequested(context);
-                        }),
-                      ),
-                    ),
-                    SizedBox(width: 12),
-                    GestureDetector(
-                      child: Container(
-                        padding: EdgeInsets.all(13),
-                        child: Stack(
-                          alignment: Alignment.topRight,
-                          children: [
-                            U.iconsax('sms-notification', color: primaryColor),
-                            Provider.of<ServiceModule>(context).unreadMessage() ? Container(
-                              width: 11, height: 11, margin: EdgeInsets.only(top: 1.3),
-                              decoration: BoxDecoration(color: Colors.red, borderRadius: BorderRadius.all(Radius.circular(50))),
-                            ):Container()
-                          ],
-                        ),
-                        decoration: BoxDecoration(
-                            color: Colors.white,
-                            borderRadius: BorderRadius.all(Radius.circular(50))
+                          onTap: () => navigateTo(context, MobReqSelectPage(user: Provider.of<UserModule>(context, listen: false).user(), title: 'search'.tr(), scope: Provider.of<ServiceModule>(context, listen: false).scoopeValue(), placeholder: Provider.of<UserModule>(context, listen: false).profile()['searchText'][context.locale.toString()] != null ? Provider.of<UserModule>(context, listen: false).profile()['searchText'][context.locale.toString()] : 'searchAsk'.tr())).then((val){
+                            val = val??true;
+                            if(val) homeFunc.getFrequentlyRequested(context);
+                          }),
                         ),
                       ),
-                      onTap: ()=>navigateTo(context, MobMessageListPage(Provider.of<UserModule>(context, listen: false).user())),
-                    )
-                  ],
-                )
-              ],
+                    ],
+                  )
+                ],
+              ),
             ),
           ),
           Expanded(

+ 14 - 10
lib/src/layouts/mobile/request_success.dart

@@ -176,11 +176,13 @@ class _MobReqSuccessPageState extends State<MobReqSuccessPage> {
           list.isNotEmpty?Column(
             children: [
               divider(),
-              Container(
-                alignment: Alignment.bottomCenter,
-                width: U.bodyWidth(context), color: Colors.white,
-                padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16),
-                child: buttonTemplate(text: 'btnWait'.tr(), action: ()=>backAction()),
+              SafeArea(
+                child: Container(
+                  alignment: Alignment.bottomCenter,
+                  width: U.bodyWidth(context), color: Colors.white,
+                  padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16),
+                  child: buttonTemplate(text: 'btnWait'.tr(), action: ()=>backAction()),
+                ),
               )
             ],
           ):Container()
@@ -341,11 +343,13 @@ class _MobReqSuccessPendingPageState extends State<MobReqSuccessPendingPage> {
           Column(
             children: [
               divider(),
-              Container(
-                alignment: Alignment.bottomCenter,
-                width: U.bodyWidth(context), color: Colors.white,
-                padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16),
-                child: buttonTemplate(text: 'btnWait'.tr(), action: ()=>backAction()),
+              SafeArea(
+                child: Container(
+                  alignment: Alignment.bottomCenter,
+                  width: U.bodyWidth(context), color: Colors.white,
+                  padding: EdgeInsets.symmetric(vertical: 10, horizontal: 16),
+                  child: buttonTemplate(text: 'btnWait'.tr(), action: ()=>backAction()),
+                ),
               )
             ],
           )

+ 14 - 6
pubspec.lock

@@ -213,10 +213,18 @@ packages:
     dependency: "direct main"
     description:
       name: camera
-      sha256: "413d2b34fe28496c35c69ede5b232fb9dd5ca2c3a4cb606b14efc1c7546cc8cb"
+      sha256: d6ec2cbdbe2fa8f5e0d07d8c06368fe4effa985a4a5ddade9cc58a8cd849557d
       url: "https://pub.dev"
     source: hosted
-    version: "0.11.1"
+    version: "0.11.2"
+  camera_android:
+    dependency: "direct main"
+    description:
+      name: camera_android
+      sha256: "4f40d053a67e99029b5be7f00ef8047b63edb65ccc4e2546b84d47e302c6bf62"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.10.10+4"
   camera_android_camerax:
     dependency: transitive
     description:
@@ -237,10 +245,10 @@ packages:
     dependency: transitive
     description:
       name: camera_platform_interface
-      sha256: "953e7baed3a7c8fae92f7200afeb2be503ff1a17c3b4e4ed7b76f008c2810a31"
+      sha256: "2f757024a48696ff4814a789b0bd90f5660c0fb25f393ab4564fb483327930e2"
       url: "https://pub.dev"
     source: hosted
-    version: "2.9.0"
+    version: "2.10.0"
   camera_web:
     dependency: transitive
     description:
@@ -743,10 +751,10 @@ packages:
     dependency: "direct main"
     description:
       name: flutter_svg
-      sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b
+      sha256: cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845
       url: "https://pub.dev"
     source: hosted
-    version: "2.0.17"
+    version: "2.2.0"
   flutter_test:
     dependency: "direct dev"
     description: flutter

+ 3 - 2
pubspec.yaml

@@ -56,7 +56,8 @@ dependencies:
   image_picker: ^1.1.2
   path_provider: ^2.1.5
   uuid: ^4.5.1
-  camera: ^0.11.1
+  camera: ^0.11.2
+  camera_android: ^0.10.10+4
   another_flushbar: ^1.12.30
   fluttertoast: ^8.2.10
   synchronized: ^3.3.0+3
@@ -87,7 +88,7 @@ dependencies:
   carousel_slider: ^5.0.0
   simple_connection_checker: ^0.3.4
   flutter_linkify: ^6.0.0
-  flutter_svg: ^2.0.17
+  flutter_svg: ^2.2.0
   selectable_autolink_text: ^2.6.0
   flutter_native_splash: ^2.4.4
   searchfield: ^1.2.4