diff --git a/packages/at_common_flutter/CHANGELOG.md b/packages/at_common_flutter/CHANGELOG.md index 8140bd067..e92ed68b1 100644 --- a/packages/at_common_flutter/CHANGELOG.md +++ b/packages/at_common_flutter/CHANGELOG.md @@ -1,66 +1,91 @@ +## 2.0.15 + +- **FIX**: Replace depreciated `withOpacity` method with `withValues` + ## 2.0.14 + - **CHORE**: Addressed static analysis info and warning messages to improve code quality and reduce noise during analysis. - **FIX**: Replace depreciated items with up-to-date-ones ## 2.0.13: + - **CHORE**: Major version increase of at_commons from ^3.0.55 to ^4.0.1 ## 2.0.12 + - **CHORE**: Updated repository URL ## 2.0.11 + - **CHORE**: Updated dependencies and android gradle versions ## 2.0.10 + - **CHORE**: Updated readme ## 2.0.9 + - **FIX**: Minor UI updates - **CHORE**: Updated dependency ## 2.0.8 + - **FIX**: Lint Fixes according to flutter 3.0 ## 2.0.7 + - **FIX**: Added missing fontWeight ## 2.0.6 + - **DOCS**: Documentation updated ## 2.0.5 + - **DOCS**: Updated Readme.md and example.md - **CHORE**: Updated example to demonstrate inheriting theme from calling app ## 2.0.4 + - **FEAT**: Added check for mobile, tablet and desktop in SizeConfig - + ## 2.0.3 + - **FEAT**: Added `isDesktop` check in CustomAppBar ## 2.0.2 + - **FEAT**: borderRadius option added in CustomButton ## 2.0.1 + - **UPDATE**: Updated description, repository link - **FEAT**: More options in CustomInputField ## 2.0.0 + - **UPDATE**: Null safety support ## 1.0.1 + - **DOCS**: Updated documentation ## 1.0.0 + - **CHORE**: Updated authentication in example app ## 0.0.4 + - **CHORE**: Updated example app ## 0.0.3 + - **CHORE**: Updated with example app ## 0.0.2 + - **BREAKING CHANGES**: This release consists of parameter change in custom button and custom input field ## 0.0.1 + - The initial release consists of custom appBar, custom button and custom input field diff --git a/packages/at_common_flutter/example/lib/main.dart b/packages/at_common_flutter/example/lib/main.dart index b625f97f8..719768e62 100644 --- a/packages/at_common_flutter/example/lib/main.dart +++ b/packages/at_common_flutter/example/lib/main.dart @@ -136,8 +136,8 @@ class _MyHomePageState extends State { log('Current value of input field: $val'); }, inputFieldColor: Theme.of(context).brightness == Brightness.light - ? Colors.black.withOpacity(0.2) - : Colors.white.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.2) + : Colors.white.withValues(alpha: 0.2), ), const Divider( color: Color(0xFFBEC0C8), diff --git a/packages/at_common_flutter/example/macos/Podfile b/packages/at_common_flutter/example/macos/Podfile index dade8dfad..049abe295 100644 --- a/packages/at_common_flutter/example/macos/Podfile +++ b/packages/at_common_flutter/example/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.11' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/packages/at_common_flutter/example/macos/Runner.xcodeproj/project.pbxproj b/packages/at_common_flutter/example/macos/Runner.xcodeproj/project.pbxproj index 14b1b9d5e..b41db4d5a 100644 --- a/packages/at_common_flutter/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/at_common_flutter/example/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -182,7 +182,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { @@ -235,6 +235,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -344,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -423,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -470,7 +471,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/at_common_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/at_common_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 5cebb710e..89f8ebe28 100644 --- a/packages/at_common_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/at_common_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/packages/at_common_flutter/pubspec.yaml b/packages/at_common_flutter/pubspec.yaml index f0e7b2b26..c2b683e79 100644 --- a/packages/at_common_flutter/pubspec.yaml +++ b/packages/at_common_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: at_common_flutter description: A Flutter package to provide common widgets used by other atPlatform Flutter packages. -version: 2.0.14 +version: 2.0.15 homepage: https://docs.atsign.com/ repository: https://github.com/atsign-foundation/at_widgets/tree/trunk/packages/at_common_flutter issue_tracker: https://github.com/atsign-foundation/at_widgets/issues diff --git a/packages/at_location_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/at_location_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift index a61ce2a1c..7965a2864 100644 --- a/packages/at_location_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/packages/at_location_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -16,6 +16,7 @@ import share_plus import shared_preferences_foundation import sqflite import url_launcher_macos +import webview_flutter_wkwebview func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin")) @@ -29,4 +30,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin")) } diff --git a/packages/at_onboarding_flutter/CHANGELOG.md b/packages/at_onboarding_flutter/CHANGELOG.md index 951da8f8a..4c546656a 100644 --- a/packages/at_onboarding_flutter/CHANGELOG.md +++ b/packages/at_onboarding_flutter/CHANGELOG.md @@ -1,10 +1,16 @@ +## 6.1.10 + +- **FIX** Replace depreciated `withOpacity` method with `withValues`. + ## 6.1.9 + - build[deps]: Upgraded dependencies for the following packages: - at_client: 3.2.2 - at_client_mobile: 3.2.19 - at_auth: 2.0.7 - at_commons: 5.0.0 - at_utils: 3.0.19 + ## 6.1.8 - **CHORE**: Updated dependencies diff --git a/packages/at_onboarding_flutter/example/ios/Podfile.lock b/packages/at_onboarding_flutter/example/ios/Podfile.lock index d3e09e904..ca7f9f57d 100644 --- a/packages/at_onboarding_flutter/example/ios/Podfile.lock +++ b/packages/at_onboarding_flutter/example/ios/Podfile.lock @@ -150,12 +150,12 @@ SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_keychain: 01aabf894ffe8b01adfda1d9df21c210c1b4b452 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb - package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c + package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866 - share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad + share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe diff --git a/packages/at_onboarding_flutter/example/macos/Podfile.lock b/packages/at_onboarding_flutter/example/macos/Podfile.lock index 0403151df..23b512376 100644 --- a/packages/at_onboarding_flutter/example/macos/Podfile.lock +++ b/packages/at_onboarding_flutter/example/macos/Podfile.lock @@ -65,13 +65,13 @@ SPEC CHECKSUMS: at_file_saver: 1fc6ed722f17c7a20ce79cce168d1100fcad4b95 biometric_storage: 43caa6e7ef00e8e19c074216e7e1786dacda9e76 device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720 - file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2 + file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c + package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf + share_plus: 1fa619de8392a4398bfaf176d441853922614e89 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 + url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404 webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4 PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 diff --git a/packages/at_onboarding_flutter/example/macos/Runner/AppDelegate.swift b/packages/at_onboarding_flutter/example/macos/Runner/AppDelegate.swift index 8e02df288..b3c176141 100644 --- a/packages/at_onboarding_flutter/example/macos/Runner/AppDelegate.swift +++ b/packages/at_onboarding_flutter/example/macos/Runner/AppDelegate.swift @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart index a3cf1a1f5..f6bb30248 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart @@ -44,12 +44,10 @@ class AtOnboardingGenerateScreen extends StatefulWidget { }) : super(key: key); @override - State createState() => - _AtOnboardingGenerateScreenState(); + State createState() => _AtOnboardingGenerateScreenState(); } -class _AtOnboardingGenerateScreenState - extends State { +class _AtOnboardingGenerateScreenState extends State { final TextEditingController _atsignController = TextEditingController(); final FreeAtsignService _freeAtsignService = FreeAtsignService(); late AtSyncDialog _inprogressDialog; @@ -80,16 +78,14 @@ class _AtOnboardingGenerateScreenState if (widget.config.tutorialDisplay == AtOnboardingTutorialDisplay.always) { await Future.delayed(const Duration(milliseconds: 300)); _showTutorial(); - } else if (widget.config.tutorialDisplay == - AtOnboardingTutorialDisplay.never) { + } else if (widget.config.tutorialDisplay == AtOnboardingTutorialDisplay.never) { return; } else { final result = await AtOnboardingTutorialService.checkShowTutorial(); if (!result) { await Future.delayed(const Duration(milliseconds: 300)); - final result = - await AtOnboardingTutorialService.hasShowTutorialSignUp(); + final result = await AtOnboardingTutorialService.hasShowTutorialSignUp(); if (!result) { _showTutorial(); } @@ -218,9 +214,8 @@ class _AtOnboardingGenerateScreenState child: SingleChildScrollView( child: Container( decoration: BoxDecoration( - color: theme.primaryColor.withOpacity(0.1), - borderRadius: - BorderRadius.circular(AtOnboardingDimens.borderRadius)), + color: theme.primaryColor.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)), padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), constraints: const BoxConstraints( @@ -243,8 +238,7 @@ class _AtOnboardingGenerateScreenState enabled: false, validator: (String? value) { if ((value ?? '').isEmpty) { - return AtOnboardingLocalizations - .current.msg_atSign_cannot_empty; + return AtOnboardingLocalizations.current.msg_atSign_cannot_empty; } return null; }, @@ -260,8 +254,7 @@ class _AtOnboardingGenerateScreenState color: theme.primaryColor, ), ), - contentPadding: const EdgeInsets.symmetric( - horizontal: AtOnboardingDimens.paddingSmall), + contentPadding: const EdgeInsets.symmetric(horizontal: AtOnboardingDimens.paddingSmall), ), ), const SizedBox(height: 20), @@ -355,8 +348,7 @@ class _AtOnboardingGenerateScreenState highlightColor: Colors.transparent, splashColor: Colors.transparent, child: Text( - AtOnboardingLocalizations - .current.btn_already_have_atSign, + AtOnboardingLocalizations.current.btn_already_have_atSign, key: keyHaveAnAtSign, style: TextStyle( fontSize: AtOnboardingDimens.fontNormal, @@ -402,10 +394,8 @@ class _AtOnboardingGenerateScreenState } Future showErrorDialog(dynamic errorMessage, {String? title}) async { - String? messageString = - AtOnboardingErrorToString().getErrorMessage(errorMessage); - return AtOnboardingDialog.showError( - context: context, message: messageString); + String? messageString = AtOnboardingErrorToString().getErrorMessage(errorMessage); + return AtOnboardingDialog.showError(context: context, message: messageString); } void _showReferenceWebview() { @@ -467,8 +457,7 @@ class _AtOnboardingGenerateScreenState if (isExist) { _inprogressDialog.close(); - await _showAlertDialog( - AtOnboardingErrorToString().pairedAtsign(verifiedAtSign)); + await _showAlertDialog(AtOnboardingErrorToString().pairedAtsign(verifiedAtSign)); return; } @@ -492,8 +481,7 @@ class _AtOnboardingGenerateScreenState ); if (!mounted) return; - Navigator.pop( - context, AtOnboardingResult.success(atsign: verifiedAtSign)); + Navigator.pop(context, AtOnboardingResult.success(atsign: verifiedAtSign)); } else if (authResponse == AtOnboardingResponseStatus.serverNotReached) { await _showAlertDialog( AtOnboardingLocalizations.current.msg_atSign_unreachable, @@ -531,9 +519,7 @@ class _AtOnboardingGenerateScreenState } Future _showAlertDialog(dynamic errorMessage, {String? title}) async { - String? messageString = - AtOnboardingErrorToString().getErrorMessage(errorMessage); - return AtOnboardingDialog.showError( - context: context, title: title, message: messageString); + String? messageString = AtOnboardingErrorToString().getErrorMessage(errorMessage); + return AtOnboardingDialog.showError(context: context, title: title, message: messageString); } } diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart index 593407dec..b44669f60 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart @@ -141,7 +141,7 @@ class _AtOnboardingHomeScreenState extends State { child: Container( // width: _dialogWidth, decoration: BoxDecoration( - color: theme.primaryColor.withOpacity(0.1), + color: theme.primaryColor.withValues(alpha: .1), borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)), padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart index e31c9409b..1a62c1900 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart @@ -19,12 +19,10 @@ class AtOnboardingInputAtSignScreen extends StatefulWidget { }) : super(key: key); @override - State createState() => - _AtOnboardingInputAtSignScreenState(); + State createState() => _AtOnboardingInputAtSignScreenState(); } -class _AtOnboardingInputAtSignScreenState - extends State { +class _AtOnboardingInputAtSignScreenState extends State { final TextEditingController _atsignController = TextEditingController(); @override @@ -55,9 +53,8 @@ class _AtOnboardingInputAtSignScreenState child: SingleChildScrollView( child: Container( decoration: BoxDecoration( - color: theme.primaryColor.withOpacity(0.1), - borderRadius: - BorderRadius.circular(AtOnboardingDimens.borderRadius)), + color: theme.primaryColor.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)), padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), constraints: const BoxConstraints( @@ -77,8 +74,7 @@ class _AtOnboardingInputAtSignScreenState ), const SizedBox(height: 2), Text( - AtOnboardingLocalizations - .current.enter_atSign_need_to_activate, + AtOnboardingLocalizations.current.enter_atSign_need_to_activate, style: const TextStyle( fontSize: AtOnboardingDimens.fontSmall, ), @@ -88,8 +84,7 @@ class _AtOnboardingInputAtSignScreenState enabled: true, validator: (String? value) { if ((value ?? '').isEmpty) { - return AtOnboardingLocalizations - .current.msg_atSign_cannot_empty; + return AtOnboardingLocalizations.current.msg_atSign_cannot_empty; } return null; }, @@ -105,8 +100,7 @@ class _AtOnboardingInputAtSignScreenState color: theme.primaryColor, ), ), - contentPadding: const EdgeInsets.symmetric( - horizontal: AtOnboardingDimens.paddingSmall), + contentPadding: const EdgeInsets.symmetric(horizontal: AtOnboardingDimens.paddingSmall), ), ), const SizedBox(height: 20), diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart index b51ac35a1..8385bd7d3 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart @@ -25,8 +25,7 @@ class AtOnboardingIntroScreen extends StatefulWidget { }) : super(key: key); @override - State createState() => - _AtOnboardingIntroScreenState(); + State createState() => _AtOnboardingIntroScreenState(); } class _AtOnboardingIntroScreenState extends State { @@ -59,9 +58,8 @@ class _AtOnboardingIntroScreenState extends State { child: SingleChildScrollView( child: Container( decoration: BoxDecoration( - color: theme.primaryColor.withOpacity(0.1), - borderRadius: - BorderRadius.circular(AtOnboardingDimens.borderRadius)), + color: theme.primaryColor.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)), padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), constraints: const BoxConstraints( @@ -85,8 +83,7 @@ class _AtOnboardingIntroScreenState extends State { color: theme.primaryColor, decoration: TextDecoration.underline, ), - recognizer: TapGestureRecognizer() - ..onTap = _showReferenceWebview, + recognizer: TapGestureRecognizer()..onTap = _showReferenceWebview, ), ], ), diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart index 270664561..b58dd3f3c 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart @@ -117,9 +117,8 @@ class _AtOnboardingOTPScreenState extends State { child: SingleChildScrollView( child: Container( decoration: BoxDecoration( - color: theme.primaryColor.withOpacity(0.1), - borderRadius: - BorderRadius.circular(AtOnboardingDimens.borderRadius)), + color: theme.primaryColor.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)), padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), constraints: const BoxConstraints( @@ -144,15 +143,11 @@ class _AtOnboardingOTPScreenState extends State { textCapitalization: TextCapitalization.characters, appContext: context, length: 4, - textStyle: const TextStyle( - fontSize: 24, fontWeight: FontWeight.bold), + textStyle: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), pinTheme: PinTheme( - selectedColor: - hasOTPError ? Colors.red : theme.primaryColor, - activeColor: - hasOTPError ? Colors.red : theme.primaryColor, - inactiveColor: - hasOTPError ? Colors.red : Colors.grey[500], + selectedColor: hasOTPError ? Colors.red : theme.primaryColor, + activeColor: hasOTPError ? Colors.red : theme.primaryColor, + inactiveColor: hasOTPError ? Colors.red : Colors.grey[500], shape: PinCodeFieldShape.box, borderRadius: BorderRadius.circular(5), fieldHeight: 48, @@ -216,8 +211,7 @@ class _AtOnboardingOTPScreenState extends State { ), ), TextSpan( - text: AtOnboardingLocalizations - .current.note_otp_content, + text: AtOnboardingLocalizations.current.note_otp_content, style: theme.textTheme.bodyMedium?.copyWith( fontSize: AtOnboardingDimens.fontSmall, height: 1.5, @@ -237,8 +231,7 @@ class _AtOnboardingOTPScreenState extends State { } Future showErrorDialog(String? errorMessage) async { - return AtOnboardingDialog.showError( - context: context, message: errorMessage ?? ''); + return AtOnboardingDialog.showError(context: context, message: errorMessage ?? ''); } Future _showSuccessDialog(ThemeData theme) { @@ -250,8 +243,7 @@ class _AtOnboardingOTPScreenState extends State { data: theme, child: AtOnboardingDialog( title: AtOnboardingLocalizations.current.notice, - message: - '${AtOnboardingLocalizations.current.verification_code_sent_to} ${widget.email}', + message: '${AtOnboardingLocalizations.current.verification_code_sent_to} ${widget.email}', actions: [ AtOnboardingSecondaryButton( child: Text( @@ -297,8 +289,7 @@ class _AtOnboardingOTPScreenState extends State { if ((widget.email ?? '').isEmpty) { isVerifing = true; setState(() {}); - final secret = await validatewithAtsign( - widget.atSign, _pinCodeController.text, context); + final secret = await validatewithAtsign(widget.atSign, _pinCodeController.text, context); isVerifing = false; setState(() {}); if (!mounted) return; @@ -320,8 +311,7 @@ class _AtOnboardingOTPScreenState extends State { isVerifing = true; setState(() {}); - String? result = await validatePerson( - widget.atSign, widget.email!, _pinCodeController.text); + String? result = await validatePerson(widget.atSign, widget.email!, _pinCodeController.text); isVerifing = false; setState(() {}); @@ -340,14 +330,12 @@ class _AtOnboardingOTPScreenState extends State { } ///With activate account - Future validatewithAtsign( - String atsign, String otp, BuildContext context, + Future validatewithAtsign(String atsign, String otp, BuildContext context, {bool isConfirmation = false}) async { dynamic data; String? cramSecret; - dynamic response = - await _freeAtsignService.verificationWithAtsign(atsign, otp); + dynamic response = await _freeAtsignService.verificationWithAtsign(atsign, otp); if (response.statusCode == 200) { data = response.body; data = jsonDecode(data); @@ -423,8 +411,7 @@ class _AtOnboardingOTPScreenState extends State { hasOTPError = false; }); // String atsign; - dynamic response = - await _freeAtsignService.registerPerson(widget.atSign, widget.email!); + dynamic response = await _freeAtsignService.registerPerson(widget.atSign, widget.email!); if (response.statusCode == 200) { //Success _pinCodeController.text = ''; @@ -449,22 +436,18 @@ class _AtOnboardingOTPScreenState extends State { }); } - Future validatePerson(String atsign, String email, String? otp, - {bool isConfirmation = false}) async { + Future validatePerson(String atsign, String email, String? otp, {bool isConfirmation = false}) async { dynamic data; String? cramSecret; List atsigns = []; // String atsign; - dynamic response = await _freeAtsignService - .validatePerson(atsign, email, otp, confirmation: isConfirmation); + dynamic response = await _freeAtsignService.validatePerson(atsign, email, otp, confirmation: isConfirmation); if (response.statusCode == 200) { data = response.body; data = jsonDecode(data); //check for the atsign list and display them. - if (data['data'] != null && - data['data'].length == 2 && - data['status'] != 'error') { + if (data['data'] != null && data['data'].length == 2 && data['status'] != 'error') { dynamic responseData = data['data']; atsigns.addAll(List.from(responseData['atsigns'])); @@ -482,8 +465,7 @@ class _AtOnboardingOTPScreenState extends State { ); if (value != null) { if (!mounted) return null; - Navigator.pop( - context, AtOnboardingOTPResult(atSign: value, secret: null)); + Navigator.pop(context, AtOnboardingOTPResult(atSign: value, secret: null)); } return null; } @@ -501,14 +483,12 @@ class _AtOnboardingOTPScreenState extends State { ), ); if (value == responseData['newAtsign']) { - cramSecret = await validatePerson(value as String, email, otp, - isConfirmation: true); + cramSecret = await validatePerson(value as String, email, otp, isConfirmation: true); return cramSecret; } else { if (value != null) { if (!mounted) return null; - Navigator.pop( - context, AtOnboardingOTPResult(atSign: value, secret: null)); + Navigator.pop(context, AtOnboardingOTPResult(atSign: value, secret: null)); } return null; } @@ -541,14 +521,11 @@ class _AtOnboardingOTPScreenState extends State { return cramSecret; } - Future registerPersona( - String atsign, String email, BuildContext context, - {String? oldEmail}) async { + Future registerPersona(String atsign, String email, BuildContext context, {String? oldEmail}) async { dynamic data; bool status = false; // String atsign; - dynamic response = await _freeAtsignService.registerPerson(atsign, email, - oldEmail: oldEmail); + dynamic response = await _freeAtsignService.registerPerson(atsign, email, oldEmail: oldEmail); if (response.statusCode == 200) { data = response.body; data = jsonDecode(data); @@ -585,10 +562,8 @@ class _AtOnboardingOTPScreenState extends State { text: TextSpan( children: [ TextSpan( - style: const TextStyle( - color: Colors.black, fontSize: 16, letterSpacing: 0.5), - text: - AtOnboardingLocalizations.current.msg_maximum_atSign_prev, + style: const TextStyle(color: Colors.black, fontSize: 16, letterSpacing: 0.5), + text: AtOnboardingLocalizations.current.msg_maximum_atSign_prev, ), TextSpan( text: 'https://my.atsign.com', @@ -600,16 +575,13 @@ class _AtOnboardingOTPScreenState extends State { recognizer: TapGestureRecognizer() ..onTap = () async { String url = 'https://my.atsign.com'; - if (!widget.hideReferences && - await canLaunchUrl(Uri.parse(url))) { + if (!widget.hideReferences && await canLaunchUrl(Uri.parse(url))) { await launchUrl(Uri.parse(url)); } }), TextSpan( - text: - AtOnboardingLocalizations.current.msg_maximum_atSign_next, - style: const TextStyle( - color: Colors.black, fontSize: 16, letterSpacing: 0.5), + text: AtOnboardingLocalizations.current.msg_maximum_atSign_next, + style: const TextStyle(color: Colors.black, fontSize: 16, letterSpacing: 0.5), ), ], ), diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart index 4e117f7a6..340ccb6d8 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart @@ -88,9 +88,8 @@ class _AtOnboardingPairScreenState extends State { child: SingleChildScrollView( child: Container( decoration: BoxDecoration( - color: theme.primaryColor.withOpacity(0.1), - borderRadius: - BorderRadius.circular(AtOnboardingDimens.borderRadius)), + color: theme.primaryColor.withValues(alpha: 0.1), + borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)), padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal), constraints: const BoxConstraints( @@ -114,8 +113,7 @@ class _AtOnboardingPairScreenState extends State { focusNode: _focusNode, validator: (String? value) { if ((value ?? '').isEmpty) { - return AtOnboardingLocalizations - .current.msg_atSign_cannot_empty; + return AtOnboardingLocalizations.current.msg_atSign_cannot_empty; } return null; }, @@ -123,9 +121,7 @@ class _AtOnboardingPairScreenState extends State { inputFormatters: [ LengthLimitingTextInputFormatter(80), // This inputFormatter function will convert all the input to lowercase. - TextInputFormatter.withFunction( - (TextEditingValue oldValue, - TextEditingValue newValue) { + TextInputFormatter.withFunction((TextEditingValue oldValue, TextEditingValue newValue) { return newValue.copyWith( text: newValue.text.toLowerCase(), selection: newValue.selection, @@ -136,8 +132,7 @@ class _AtOnboardingPairScreenState extends State { decoration: InputDecoration( fillColor: Colors.blueAccent, errorStyle: const TextStyle(fontSize: 12), - prefixStyle: - TextStyle(color: theme.primaryColor, fontSize: 15), + prefixStyle: TextStyle(color: theme.primaryColor, fontSize: 15), border: OutlineInputBorder( borderSide: BorderSide( color: theme.primaryColor, @@ -148,8 +143,7 @@ class _AtOnboardingPairScreenState extends State { color: Colors.grey[500]!, ), ), - contentPadding: const EdgeInsets.symmetric( - horizontal: AtOnboardingDimens.paddingSmall), + contentPadding: const EdgeInsets.symmetric(horizontal: AtOnboardingDimens.paddingSmall), ), ), const SizedBox(height: 10), @@ -212,8 +206,7 @@ class _AtOnboardingPairScreenState extends State { isParing = true; setState(() {}); bool status = false; - status = - await registerPersona(widget.atSign, _emailController.text, context); + status = await registerPersona(widget.atSign, _emailController.text, context); isParing = false; setState(() {}); if (status) { @@ -236,14 +229,11 @@ class _AtOnboardingPairScreenState extends State { } } - Future registerPersona( - String atsign, String email, BuildContext context, - {String? oldEmail}) async { + Future registerPersona(String atsign, String email, BuildContext context, {String? oldEmail}) async { dynamic data; bool status = false; // String atsign; - dynamic response = await _freeAtsignService.registerPerson(atsign, email, - oldEmail: oldEmail); + dynamic response = await _freeAtsignService.registerPerson(atsign, email, oldEmail: oldEmail); if (response.statusCode == 200) { data = response.body; data = jsonDecode(data); @@ -281,10 +271,8 @@ class _AtOnboardingPairScreenState extends State { text: TextSpan( children: [ TextSpan( - style: const TextStyle( - color: Colors.black, fontSize: 16, letterSpacing: 0.5), - text: - AtOnboardingLocalizations.current.msg_maximum_atSign_prev, + style: const TextStyle(color: Colors.black, fontSize: 16, letterSpacing: 0.5), + text: AtOnboardingLocalizations.current.msg_maximum_atSign_prev, ), TextSpan( text: 'https://my.atsign.com', @@ -296,14 +284,12 @@ class _AtOnboardingPairScreenState extends State { recognizer: TapGestureRecognizer() ..onTap = () async { String url = 'https://my.atsign.com'; - if (!widget.hideReferences && - await canLaunchUrl(Uri.parse(url))) { + if (!widget.hideReferences && await canLaunchUrl(Uri.parse(url))) { await launchUrl(Uri.parse(url)); } }), TextSpan( - text: - AtOnboardingLocalizations.current.msg_maximum_atSign_next, + text: AtOnboardingLocalizations.current.msg_maximum_atSign_next, style: const TextStyle( color: Colors.black, fontSize: 16, @@ -342,13 +328,11 @@ class _AtOnboardingPairScreenState extends State { if (result != null && result.secret != null) { if (!mounted) return; Navigator.pop(context); - widget.onGenerateSuccess - ?.call(atSign: result.atSign, secret: result.secret ?? ''); + widget.onGenerateSuccess?.call(atSign: result.atSign, secret: result.secret ?? ''); } else if (result != null) { dynamic data; //User choose a difference atsign to onboard - dynamic response = - await _freeAtsignService.loginWithAtsign(result.atSign); + dynamic response = await _freeAtsignService.loginWithAtsign(result.atSign); if (response.statusCode == 200) { data = response.body; data = jsonDecode(data); @@ -369,8 +353,7 @@ class _AtOnboardingPairScreenState extends State { if (result2 != null) { if (!mounted) return; Navigator.pop(context); - widget.onGenerateSuccess - ?.call(atSign: result2.atSign, secret: result2.secret ?? ''); + widget.onGenerateSuccess?.call(atSign: result2.atSign, secret: result2.secret ?? ''); } else { if (!mounted) return; Navigator.pop(context); diff --git a/packages/at_onboarding_flutter/pubspec.yaml b/packages/at_onboarding_flutter/pubspec.yaml index 064680e9c..0dd8298fe 100644 --- a/packages/at_onboarding_flutter/pubspec.yaml +++ b/packages/at_onboarding_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: at_onboarding_flutter description: A Flutter plugin project for onboarding any atSign in atPlatform apps with ease. Provides a QRscanner option and an upload key file option to authenticate. -version: 6.1.9 +version: 6.1.10 homepage: https://docs.atsign.com/ repository: https://github.com/atsign-foundation/at_widgets/tree/trunk/packages/at_onboarding_flutter issue_tracker: https://github.com/atsign-foundation/at_widgets/issues diff --git a/packages/at_theme_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/at_theme_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift index 591d027b4..417197bd7 100644 --- a/packages/at_theme_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/packages/at_theme_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -14,6 +14,7 @@ import path_provider_foundation import share_plus import shared_preferences_foundation import url_launcher_macos +import webview_flutter_wkwebview func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin")) @@ -25,4 +26,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin")) }