diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6c20874..8ba9947 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -495,7 +495,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = T8P9KW8GWH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -511,7 +511,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; @@ -680,7 +680,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = T8P9KW8GWH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -697,7 +697,7 @@ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -709,7 +709,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = T8P9KW8GWH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -725,7 +725,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; diff --git a/lib/common/dialogs/customer_dialog.dart b/lib/common/dialogs/customer_dialog.dart new file mode 100644 index 0000000..eeaf01b --- /dev/null +++ b/lib/common/dialogs/customer_dialog.dart @@ -0,0 +1,195 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class CustomerTwoActionDialog extends Dialog { + const CustomerTwoActionDialog( + this.title, + this.leftTitle, + this.rightTitle, + this.content, + this.leftTap, + this.rightTap, {super.key}); + final String title; + final String leftTitle; + final String rightTitle; + final String content; + final GestureTapCallback leftTap; + final GestureTapCallback rightTap; + + @override + Widget build(BuildContext context) { + super.build(context); + return Container( + height: 238.h, + alignment: Alignment.center, + child: ConstrainedBox( + constraints: BoxConstraints( + maxHeight: 238.h, + maxWidth: 407.w + ), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 24.w,vertical: 15.h), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: const Color(0xFF333333), + width: 1.5 + ), + borderRadius: BorderRadius.circular(10.r) + ), + child: Column( + children: [ + Text( + title, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 21.sp, + color: const Color(0xFF333333) + ), + ), + Expanded( + child: Text( + content, + textAlign: TextAlign.left, + style: TextStyle( + color: const Color(0xFF333333), + fontSize: 13.sp + ) + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextButton( + onPressed: leftTap, + child: Container( + height: 31.h, + padding: EdgeInsets.symmetric( + horizontal: 6.w + ), + decoration: BoxDecoration( + color: const Color(0xFFFBB661), + border: Border.all( + color: const Color(0xFF333333), + width: 1.5 + ), + borderRadius: BorderRadius.circular(10.r) + ), + child: Text( + leftTitle, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 19.sp + ),), + )), + 27.horizontalSpace, + TextButton( + onPressed: rightTap, + child: Container( + height: 31.h, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: const Color(0xFF333333), + width: 1.0 + ), + borderRadius: BorderRadius.circular(10.r) + ), + padding: EdgeInsets.symmetric( + horizontal: 6.w + ), + child: Text( + rightTitle, + textAlign: TextAlign.center, + style: TextStyle( + color: const Color(0xFF333333), + fontSize: 19.sp + ),), + )) + ], + ) + ], + ), + ), + ), + ); + } +} + +class CustomerOneActionDialog extends Dialog { + const CustomerOneActionDialog(this.title, this.ensureTitle, this.content, this.ensureTap, {super.key}); + final String title; + final String ensureTitle; + final String content; + final GestureTapCallback ensureTap; + + @override + Widget build(BuildContext context) { + super.build(context); + return Container( + alignment: Alignment.center, + child: ConstrainedBox( + constraints: BoxConstraints( + maxHeight: 238.h, + maxWidth: 407.w + ), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 24.w,vertical: 15.h), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: const Color(0xFF333333), + width: 1.5 + ), + borderRadius: BorderRadius.circular(10.r) + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 21.sp, + color: const Color(0xFF333333) + ), + ), + Text( + content, + textAlign: TextAlign.left, + style: TextStyle( + color: const Color(0xFF333333), + fontSize: 13.sp + ) + ), + TextButton( + onPressed: ensureTap, + child: Container( + height: 31.h, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: const Color(0xFF333333), + width: 1.0 + ), + borderRadius: BorderRadius.circular(10.r) + ), + padding: EdgeInsets.symmetric( + horizontal: 6.w + ), + child: Text( + ensureTitle, + textAlign: TextAlign.center, + style: TextStyle( + color: const Color(0xFF333333), + fontSize: 19.sp + ),), + )) + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/common/dialogs/show_dialog.dart b/lib/common/dialogs/show_dialog.dart new file mode 100644 index 0000000..fd4a8e1 --- /dev/null +++ b/lib/common/dialogs/show_dialog.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'package:wow_english/route/route.dart'; + +import 'customer_dialog.dart'; + +void showOneActionDialog( + String title, + String ensureTitle, + String content, + GestureTapCallback ensureTap,{ + bool? barrierDismissible + }) { + showDialog( + context: AppRouter.context, + barrierDismissible: barrierDismissible??true, + builder: (BuildContext context){ + return CustomerOneActionDialog(title, ensureTitle, content, ensureTap); + }); +} + +void showTwoActionDialog( + String title, + String leftTitle, + String rightTitle, + String content, + GestureTapCallback leftTap, + GestureTapCallback rightTap,{ + bool? barrierDismissible + }) { + showDialog( + context: AppRouter.context, + builder: (BuildContext context){ + return CustomerTwoActionDialog(title,leftTitle,rightTitle,content,leftTap,rightTap); + }); +} \ No newline at end of file