Commit 14cef54e authored by DatHV's avatar DatHV
Browse files

upload fix loading

parent a030a6e7
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=
jvm.arguments=
offline.mode=false
override.workspace.settings=false
show.console.view=false
show.executions.view=false
...@@ -33,7 +33,7 @@ tasks.register<Delete>("clean") { ...@@ -33,7 +33,7 @@ tasks.register<Delete>("clean") {
} }
plugins { plugins {
id("com.android.application") version "8.7.0" apply false id("com.android.application") version "8.9.1" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false id("org.jetbrains.kotlin.android") version "2.1.0" apply false
id("com.google.gms.google-services") version "4.4.2" apply false id("com.google.gms.google-services") version "4.4.2" apply false
} }
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.java.home=/opt/homebrew/Cellar/openjdk@17/17.0.14/libexec/openjdk.jdk/Contents/Home
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
...@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://downloads.gradle.org/distributions/gradle-8.9-all.zip distributionUrl=https\://downloads.gradle.org/distributions/gradle-8.11.1-all.zip
\ No newline at end of file
...@@ -18,7 +18,7 @@ pluginManagement { ...@@ -18,7 +18,7 @@ pluginManagement {
plugins { plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.0" apply false id("com.android.application") version "8.9.1" apply false
id("com.google.gms.google-services") version "4.4.2" apply false id("com.google.gms.google-services") version "4.4.2" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false id("org.jetbrains.kotlin.android") version "2.1.0" apply false
} }
......
{ {
"flavor":"dev", "flavor":"pro",
"baseUrl":"https://api.sandbox.mypoint.com.vn/8854/gup2start/rest", "baseUrl":"https://api.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"runner-env-flavor-dev", "t3Token":"runner-env-t3Token-pro",
"enableLogging":true "enableLogging":false
} }
...@@ -146,6 +146,7 @@ class _DeleteAccountDialogState extends State<DeleteAccountDialog> { ...@@ -146,6 +146,7 @@ class _DeleteAccountDialogState extends State<DeleteAccountDialog> {
} }
Future<void> _onConfirmDelete() async { Future<void> _onConfirmDelete() async {
Get.back();
if (DataPreference.instance.profile?.userAgreements?.hideDeleteAccount == false) { if (DataPreference.instance.profile?.userAgreements?.hideDeleteAccount == false) {
await _viewModel.confirmDelete(); await _viewModel.confirmDelete();
} else { } else {
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:mypoint_flutter_app/shared/navigation/directional_screen.dart';
import '../../features/home/custom_widget/header_home_widget.dart'; import '../../features/home/custom_widget/header_home_widget.dart';
import '../../features/home/custom_widget/product_grid_widget.dart'; import '../../features/home/custom_widget/product_grid_widget.dart';
import '../../features/pipi/pipi_detail_screen.dart'; import '../../features/pipi/pipi_detail_screen.dart';
......
...@@ -119,12 +119,14 @@ class _OtpScreenState extends BaseState<OtpScreen> with BasicState { ...@@ -119,12 +119,14 @@ class _OtpScreenState extends BaseState<OtpScreen> with BasicState {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
TextButton( TextButton(
onPressed: () => { onPressed: canResend
canResend ? vm.onResendOtp() : null, ? () {
vm.otpCode.value = "", vm.onResendOtp();
vm.errorMessage.value = "", vm.otpCode.value = "";
_pinController.clear(), vm.errorMessage.value = "";
}, _pinController.clear();
}
: null,
child: Text( child: Text(
"Gửi lại OTP ${!canResend ? "($textTime)" : ""}", "Gửi lại OTP ${!canResend ? "($textTime)" : ""}",
style: TextStyle(color: canResend ? BaseColor.second700 : BaseColor.second500), style: TextStyle(color: canResend ? BaseColor.second700 : BaseColor.second500),
......
...@@ -53,30 +53,30 @@ class AvatarPickerSheet { ...@@ -53,30 +53,30 @@ class AvatarPickerSheet {
], ],
), ),
const SizedBox(height: 36), const SizedBox(height: 36),
Row( // Row(
children: [ // children: [
_OptionButton( // _OptionButton(
icon: Icons.camera_alt, // icon: Icons.camera_alt,
label: "Chụp ảnh", // label: "Chụp ảnh",
onTap: () { // onTap: () {
Navigator.of(context).pop(); // Navigator.of(context).pop();
_requestImagePermission("camera"); // _requestImagePermission("camera");
onCameraTap(); // onCameraTap();
}, // },
), // ),
const SizedBox(width: 24), // const SizedBox(width: 24),
_OptionButton( // _OptionButton(
icon: Icons.photo_library, // icon: Icons.photo_library,
label: "Thư viện", // label: "Thư viện",
onTap: () { // onTap: () {
Navigator.of(context).pop(); // Navigator.of(context).pop();
_requestImagePermission("gallery"); // _requestImagePermission("gallery");
onGalleryTap(); // onGalleryTap();
}, // },
), // ),
], // ],
), // ),
const SizedBox(height: 24), // const SizedBox(height: 24),
const Text("Thư viện biểu cảm", style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600)), const Text("Thư viện biểu cảm", style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600)),
const SizedBox(height: 8), const SizedBox(height: 8),
LayoutBuilder( LayoutBuilder(
......
import 'package:flutter/material.dart';
import '../../shared/widgets/bottom_sheet_helper.dart';
import '../../shared/widgets/custom_navigation_bar.dart';
import '../delete_account/delete_account_dialog.dart';
class AccountManagerScreen extends StatefulWidget {
const AccountManagerScreen({super.key});
@override
State<AccountManagerScreen> createState() => _AccountManagerScreenState();
}
class _AccountManagerScreenState extends State<AccountManagerScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomNavigationBar(title: "Quản lý tài khoản"),
backgroundColor: const Color(0xFFF5F6F7),
body: Column(
children: [
Container(
width: double.infinity,
margin: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
decoration: BoxDecoration(
color: Colors.white,
),
child: Column(
children: [
_buildSettingItem(
icon: Icons.delete_outline,
title: 'Xóa tài khoản',
onTap: () {
BottomSheetHelper.showBottomSheetPopup(
child: const DeleteAccountDialog(),
);
},
textColor: Colors.red,
iconColor: Colors.red,
showTrailing: false,
),
],
),
),
const Expanded(child: SizedBox()),
],
),
);
}
Widget _buildSettingItem({
required IconData icon,
required String title,
required VoidCallback onTap,
Widget? trailing,
Color? textColor,
Color? iconColor,
bool showTrailing = true,
}) {
return ListTile(
leading: Icon(icon, color: iconColor ?? Colors.black54),
title: Text(
title,
style: TextStyle(
fontSize: 16,
color: textColor ?? Colors.black87,
fontWeight: FontWeight.w500,
),
),
trailing: trailing ?? (showTrailing ? const Icon(Icons.chevron_right, color: Colors.black26) : null),
onTap: onTap,
contentPadding: const EdgeInsets.symmetric(horizontal: 16),
);
}
}
\ No newline at end of file
...@@ -88,16 +88,11 @@ class _SettingScreenState extends State<SettingScreen> { ...@@ -88,16 +88,11 @@ class _SettingScreenState extends State<SettingScreen> {
_buildDivider(), _buildDivider(),
if (!kIsWeb) if (!kIsWeb)
_buildSettingItem( _buildSettingItem(
icon: Icons.delete_outline, icon: Icons.manage_accounts_outlined,
title: 'Xóa tài khoản', title: 'Quản lý tài khoản',
onTap: () { onTap: () {
BottomSheetHelper.showBottomSheetPopup( Get.toNamed(accountManagerScreen);
child: const DeleteAccountDialog(),
);
}, },
textColor: Colors.red,
iconColor: Colors.red,
showTrailing: false,
), ),
], ],
), ),
......
...@@ -6,6 +6,7 @@ import '../../../shared/widgets/base_view/base_response_model.dart'; ...@@ -6,6 +6,7 @@ import '../../../shared/widgets/base_view/base_response_model.dart';
import '../../../core/network/restful_api_viewmodel.dart'; import '../../../core/network/restful_api_viewmodel.dart';
import '../../../app/config/constants.dart'; import '../../../app/config/constants.dart';
import '../../../shared/router_gage.dart'; import '../../../shared/router_gage.dart';
import '../../../shared/widgets/loading/app_loading.dart';
import '../../transaction/model/order_product_payment_response_model.dart'; import '../../transaction/model/order_product_payment_response_model.dart';
import '../models/product_model.dart'; import '../models/product_model.dart';
import '../models/product_store_model.dart'; import '../models/product_store_model.dart';
......
...@@ -85,7 +85,7 @@ class _BaseWebViewScreenState extends BaseState<BaseWebViewScreen> ...@@ -85,7 +85,7 @@ class _BaseWebViewScreenState extends BaseState<BaseWebViewScreen>
} }
void _initializeMobileController() { void _initializeMobileController() {
AppLoading().show(); AppLoading().show(absorbPointers: false);
_webViewController = _webViewController =
WebViewController() WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted) ..setJavaScriptMode(JavaScriptMode.unrestricted)
...@@ -94,7 +94,7 @@ class _BaseWebViewScreenState extends BaseState<BaseWebViewScreen> ...@@ -94,7 +94,7 @@ class _BaseWebViewScreenState extends BaseState<BaseWebViewScreen>
NavigationDelegate( NavigationDelegate(
onPageFinished: (_) async { onPageFinished: (_) async {
AppLoading().hide(); AppLoading().hide();
final title = await _webViewController!.getTitle(); final title = await _webViewController?.getTitle();
setState(() { setState(() {
_dynamicTitle = title; _dynamicTitle = title;
}); });
...@@ -172,6 +172,7 @@ class _BaseWebViewScreenState extends BaseState<BaseWebViewScreen> ...@@ -172,6 +172,7 @@ class _BaseWebViewScreenState extends BaseState<BaseWebViewScreen>
} }
void _handleBack() async { void _handleBack() async {
AppLoading().hide();
if (kIsWeb) { if (kIsWeb) {
// Web: chỉ đơn giản quay lại // Web: chỉ đơn giản quay lại
if (context.mounted) Navigator.of(context).pop(); if (context.mounted) Navigator.of(context).pop();
......
...@@ -10,6 +10,7 @@ import '../features/onboarding/onboarding_screen.dart'; ...@@ -10,6 +10,7 @@ import '../features/onboarding/onboarding_screen.dart';
import '../features/pageDetail/campaign_detail_screen.dart'; import '../features/pageDetail/campaign_detail_screen.dart';
import '../features/personal/personal_edit_screen.dart'; import '../features/personal/personal_edit_screen.dart';
import '../features/register_campaign/register_form_input_screen.dart'; import '../features/register_campaign/register_form_input_screen.dart';
import '../features/setting/account_manager_screen.dart';
import '../features/setting/setting_screen.dart'; import '../features/setting/setting_screen.dart';
import '../features/splash/splash_screen.dart'; import '../features/splash/splash_screen.dart';
import '../features/voucher/voucher_list/voucher_list_screen.dart'; import '../features/voucher/voucher_list/voucher_list_screen.dart';
...@@ -70,6 +71,7 @@ const healthBookCardDetail = '/healthBookCardDetail'; ...@@ -70,6 +71,7 @@ const healthBookCardDetail = '/healthBookCardDetail';
const notificationDetailScreen = '/notificationDetailScreen'; const notificationDetailScreen = '/notificationDetailScreen';
const referralCodeInviteFriendScreen = '/referralCodeInviteFriendScreen'; const referralCodeInviteFriendScreen = '/referralCodeInviteFriendScreen';
const campaignInviteReferralInfoScreen = '/campaignInviteReferralInfoScreen'; const campaignInviteReferralInfoScreen = '/campaignInviteReferralInfoScreen';
const accountManagerScreen = '/accountManagerScreen';
class RouterPage { class RouterPage {
static List<GetPage> pages() { static List<GetPage> pages() {
...@@ -142,6 +144,7 @@ class RouterPage { ...@@ -142,6 +144,7 @@ class RouterPage {
GetPage(name: notificationDetailScreen, page: () => NotificationDetailScreen()), GetPage(name: notificationDetailScreen, page: () => NotificationDetailScreen()),
GetPage(name: referralCodeInviteFriendScreen, page: () => const ReferralCodeInviteFriendDeferredScreen()), GetPage(name: referralCodeInviteFriendScreen, page: () => const ReferralCodeInviteFriendDeferredScreen()),
GetPage(name: campaignInviteReferralInfoScreen, page: () => const CampaignInviteReferralInfoDeferredScreen()), GetPage(name: campaignInviteReferralInfoScreen, page: () => const CampaignInviteReferralInfoDeferredScreen()),
GetPage(name: accountManagerScreen, page: () => const AccountManagerScreen()),
]; ];
} }
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ import 'package:get/get.dart'; ...@@ -3,6 +3,7 @@ import 'package:get/get.dart';
import 'package:mypoint_flutter_app/shared/preferences/data_preference.dart'; import 'package:mypoint_flutter_app/shared/preferences/data_preference.dart';
import 'package:mypoint_flutter_app/shared/router_gage.dart'; import 'package:mypoint_flutter_app/shared/router_gage.dart';
import '../../core/theme/base_color.dart'; import '../../core/theme/base_color.dart';
import 'loading/app_loading.dart';
class CustomBackButton extends StatelessWidget { class CustomBackButton extends StatelessWidget {
final VoidCallback? onPressed; final VoidCallback? onPressed;
...@@ -36,6 +37,7 @@ class CustomBackButton extends StatelessWidget { ...@@ -36,6 +37,7 @@ class CustomBackButton extends StatelessWidget {
onPressed: onPressed:
onPressed ?? onPressed ??
() async { () async {
AppLoading().hide();
if (Get.key.currentState?.canPop() == true) { if (Get.key.currentState?.canPop() == true) {
Get.back(); Get.back();
} else { } else {
......
...@@ -60,7 +60,7 @@ class AppLoading { ...@@ -60,7 +60,7 @@ class AppLoading {
void show({ void show({
Duration timeout = const Duration(seconds: Constants.timeoutSeconds), Duration timeout = const Duration(seconds: Constants.timeoutSeconds),
Color? barrierColor = const Color(0x33000000), Color? barrierColor = const Color(0x33000000),
bool absorbPointers = true, bool absorbPointers = false,
double size = 56, double size = 56,
double strokeWidth = 4, double strokeWidth = 4,
}) { }) {
...@@ -78,11 +78,10 @@ class AppLoading { ...@@ -78,11 +78,10 @@ class AppLoading {
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
if (barrierColor != null) if (barrierColor != null)
const SizedBox.expand( IgnorePointer(
child: IgnorePointer(ignoring: true, child: SizedBox()), ignoring: !absorbPointers,
child: ModalBarrier(color: barrierColor, dismissible: false),
), ),
if (barrierColor != null)
ModalBarrier(color: barrierColor, dismissible: false),
IgnorePointer( IgnorePointer(
ignoring: !absorbPointers, ignoring: !absorbPointers,
child: Center( child: Center(
......
...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev ...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 2.01.01+2026010801 version: 2.01.01+2026011601
environment: environment:
sdk: ^3.7.0 sdk: ^3.7.0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment