diff --git a/lib/controllers/api_routes/urls.dart b/lib/controllers/api_routes/urls.dart index 11a2ecc0..f8226e55 100644 --- a/lib/controllers/api_routes/urls.dart +++ b/lib/controllers/api_routes/urls.dart @@ -1,16 +1,16 @@ class URLs { URLs._(); - static const String appReleaseBuildNumber = "23"; + static const String appReleaseBuildNumber = "24"; - // static const host1 = "https://atomsm.hmg.com"; // production url + static const host1 = "https://atomsm.hmg.com"; // production url // static const host1 = "https://atomsmdev.hmg.com"; // local DEV url - static const host1 = "https://atomsmuat.hmg.com"; // local UAT url + // static const host1 = "https://atomsmuat.hmg.com"; // local UAT url // static String _baseUrl = "$_host/mobile"; // static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis - static final String _baseUrl = "$_host/mobile"; // host local UAT - // static final String _baseUrl = "$_host/v3/mobile"; // v3 for new CM,PM,TM + // static final String _baseUrl = "$_host/mobile"; // host local UAT + static final String _baseUrl = "$_host/v3/mobile"; // v3 for production CM,PM,TM static String _host = host1; @@ -22,9 +22,13 @@ class URLs { // API Routes static get login => "$_baseUrl/MobileAuth/Login"; + static get getUserInfo => "$_baseUrl/MobileAuth/GetUserInfo"; + static get logout => "$_baseUrl/MobileAuth/Logout"; + static get enableFaceId => "$_baseUrl/MobileAuth/EnabledFaceId"; + static get checkLoginValidation => "$_baseUrl/Account/Authenticate"; // web login static get checkAppVersion => "$_baseUrl/Account/CheckAppVersion"; // web login //Reset Password Apis... diff --git a/lib/controllers/providers/settings/setting_provider.dart b/lib/controllers/providers/settings/setting_provider.dart index 3ff7aabe..6fa7687e 100644 --- a/lib/controllers/providers/settings/setting_provider.dart +++ b/lib/controllers/providers/settings/setting_provider.dart @@ -75,6 +75,7 @@ class SettingProvider extends ChangeNotifier { } void selectAssetGroup(User user) { + if(user.assetGroups ==null) return; if (user.assetGroups!.length == 1) { _assetGroup = user.assetGroups!.first; } else { diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index b9770dda..ee646b3e 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -55,30 +55,31 @@ extension WidgetExtensions on Widget { Widget toExpanded({int flex = 1}) => Expanded(flex: flex, child: this); - Widget handlePopScope({required BuildContext cxt, required VoidCallback onSave, bool? showPopUp =true}) { - return showPopUp! ? PopScope( - canPop: false, - onPopInvokedWithResult: (didPop, result) { - if (didPop) { - return; - } - showDialog( - context: cxt, - builder: (BuildContext cxt) => AcknowledgeWorkDialog( - onSave: () => onSave(), - onDiscard: () { - Navigator.of(cxt).pop(); - }, - ), - ); - }, - child: this): this; + Widget handlePopScope({required BuildContext cxt, required VoidCallback onSave, bool? showPopUp = true}) { + return showPopUp! + ? PopScope( + canPop: false, + onPopInvokedWithResult: (didPop, result) { + if (didPop) { + return; + } + showDialog( + context: cxt, + builder: (BuildContext cxt) => AcknowledgeWorkDialog( + onSave: () => onSave(), + onDiscard: () { + Navigator.of(cxt).pop(); + }, + ), + ); + }, + child: this) + : this; } - Widget toShimmer({bool isShow = true, double radius = 20,required BuildContext context}) => isShow + Widget toShimmer({bool isShow = true, double radius = 20, required BuildContext context}) => isShow ? Shimmer.fromColors( - // baseColor: const Color(0xffe8eff0), - baseColor: Theme.of(context).scaffoldBackgroundColor, + baseColor: context.isDark ? AppColor.backgroundDark : const Color(0xffe8eff0), highlightColor: AppColor.background(context), child: ClipRRect( borderRadius: BorderRadius.circular(radius), @@ -94,17 +95,26 @@ extension WidgetExtensions on Widget { ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(width: 250, height: 24).toShimmer(isShow: isShow,context: context), + const SizedBox(width: 250, height: 24).toShimmer(isShow: isShow, context: context), 8.height, - const SizedBox(width: 160, height: 16).toShimmer(isShow: isShow,context: context), + const SizedBox(width: 160, height: 16).toShimmer(isShow: isShow, context: context), 8.height, - const SizedBox(width: 120, height: 18).toShimmer(isShow: isShow,context: context).toShimmer(isShow: isShow,context: context), + const SizedBox(width: 120, height: 18).toShimmer(isShow: isShow, context: context).toShimmer(isShow: isShow, context: context), ], ).toShadowContainer(context) : this; - Widget toShadowContainer(BuildContext context, - {bool showShadow = true, double borderRadius = 14, bool withShadow = true, Color? backgroundColor, Color borderColor = Colors.transparent, double padding = 16, EdgeInsets? paddingObject, EdgeInsets? margin,}) => + Widget toShadowContainer( + BuildContext context, { + bool showShadow = true, + double borderRadius = 14, + bool withShadow = true, + Color? backgroundColor, + Color borderColor = Colors.transparent, + double padding = 16, + EdgeInsets? paddingObject, + EdgeInsets? margin, + }) => withShadow ? Container( padding: paddingObject ?? EdgeInsets.all(padding), diff --git a/pubspec.yaml b/pubspec.yaml index e7b9aadf..b3a11d0c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.3.7+26 +version: 1.3.8+27 environment: sdk: ">=3.5.0 <4.0.0"