From 69e1a3b0cc8925be1a5a00bd813e9f8324d47e00 Mon Sep 17 00:00:00 2001 From: Sardar1208 Date: Tue, 20 Feb 2024 08:45:55 +0530 Subject: [PATCH 1/3] feat: removed the qr code upload options from onboaridng --- .../example/macos/Podfile.lock | 4 +- .../lib/screen/at_onboarding_home_screen.dart | 55 ------------------- 2 files changed, 2 insertions(+), 57 deletions(-) diff --git a/packages/at_onboarding_flutter/example/macos/Podfile.lock b/packages/at_onboarding_flutter/example/macos/Podfile.lock index bc434a2a..9964a957 100644 --- a/packages/at_onboarding_flutter/example/macos/Podfile.lock +++ b/packages/at_onboarding_flutter/example/macos/Podfile.lock @@ -65,8 +65,8 @@ SPEC CHECKSUMS: path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 share_plus: 76dd39142738f7a68dd57b05093b5e8193f220f7 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 - url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3 + url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 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 dd813031..e53fd5dc 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 @@ -721,61 +721,6 @@ class _AtOnboardingHomeScreenState extends State { ), ), const SizedBox(height: 20), - if (!widget.hideQrScan) const SizedBox(height: 5), - if (!widget.hideQrScan) - Text( - AtOnboardingLocalizations.current.have_QRCode, - style: const TextStyle( - fontSize: AtOnboardingDimens.fontLarge, - fontWeight: FontWeight.bold, - ), - ), - if (!widget.hideQrScan) const SizedBox(height: 5), - if (!widget.hideQrScan) - (Platform.isAndroid || Platform.isIOS) - ? AtOnboardingSecondaryButton( - key: keyUploadQRCode, - height: 48, - borderRadius: 24, - onPressed: () async { - _showQRCodeScreen(context: context); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AtOnboardingLocalizations - .current.btn_scan_QRCode, - style: const TextStyle( - fontSize: AtOnboardingDimens.fontLarge, - ), - ), - const Icon(Icons.arrow_right_alt_rounded) - ], - ), - ) - : AtOnboardingSecondaryButton( - key: keyUploadQRCode, - height: 48, - borderRadius: 24, - isLoading: _uploadingQRCode, - onPressed: () async { - _uploadQRFileForDesktop(); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AtOnboardingLocalizations - .current.btn_upload_QRCode, - style: const TextStyle( - fontSize: AtOnboardingDimens.fontLarge), - ), - const Icon(Icons.arrow_right_alt_rounded) - ], - ), - ), - const SizedBox(height: 20), if (!widget.hideQrScan) Text( AtOnboardingLocalizations From a767dd05125862d27e844931da6c6dd8f6655e2a Mon Sep 17 00:00:00 2001 From: Sardar1208 Date: Tue, 20 Feb 2024 16:27:32 +0530 Subject: [PATCH 2/3] feat: fixed static analysis issues --- .../lib/location_modal/location_data_model.dart | 4 ++-- .../lib/map_content/flutter_map/src/layer/tile_layer.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/at_location_flutter/lib/location_modal/location_data_model.dart b/packages/at_location_flutter/lib/location_modal/location_data_model.dart index 30732ab7..8706d05c 100644 --- a/packages/at_location_flutter/lib/location_modal/location_data_model.dart +++ b/packages/at_location_flutter/lib/location_modal/location_data_model.dart @@ -90,8 +90,8 @@ class LocationSharingFor { Map toJson() { return { - 'from': from != null ? from!.toUtc().toString() : null, - 'to': to != null ? to!.toUtc().toString() : null, + 'from': from?.toUtc().toString(), + 'to': to?.toUtc().toString(), 'locationSharingType': locationSharingType.toString(), 'isAccepted': isAccepted.toString(), 'isExited': isExited.toString(), diff --git a/packages/at_location_flutter/lib/map_content/flutter_map/src/layer/tile_layer.dart b/packages/at_location_flutter/lib/map_content/flutter_map/src/layer/tile_layer.dart index db34bfcd..c81e3a99 100644 --- a/packages/at_location_flutter/lib/map_content/flutter_map/src/layer/tile_layer.dart +++ b/packages/at_location_flutter/lib/map_content/flutter_map/src/layer/tile_layer.dart @@ -1279,7 +1279,7 @@ class Coords extends CustomPoint { String toString() => 'Coords($x, $y, $z)'; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (other is Coords) { return x == other.x && y == other.y && z == other.z; } From 2c8b54175910224db7f095c60bf7117945313ac4 Mon Sep 17 00:00:00 2001 From: Sardar1208 Date: Tue, 20 Feb 2024 16:29:50 +0530 Subject: [PATCH 3/3] chore: fixed warnings in at_onboarding flutter --- .../lib/screen/at_onboarding_home_screen.dart | 6 ------ 1 file changed, 6 deletions(-) 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 e53fd5dc..51083c98 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 @@ -81,7 +81,6 @@ class _AtOnboardingHomeScreenState extends State { bool permissionGrated = false; bool _isContinue = true; - bool _uploadingQRCode = false; String? _pairingAtsign; ServerStatus? atSignStatus; @@ -957,12 +956,10 @@ class _AtOnboardingHomeScreenState extends State { try { String? aesKey, atsign; setState(() { - _uploadingQRCode = true; }); String? path = await _desktopQRFilePicker(); if (path == null) { setState(() { - _uploadingQRCode = false; }); return; } @@ -994,19 +991,16 @@ class _AtOnboardingHomeScreenState extends State { AtOnboardingLocalizations.current.error_incorrect_QRFile, ); setState(() { - _uploadingQRCode = false; }); return; } _processSharedSecret(atsign, aesKey); // await processAESKey(atsign, aesKey, false); setState(() { - _uploadingQRCode = false; }); } catch (error) { _logger.warning(error); setState(() { - _uploadingQRCode = false; }); await showErrorDialog( AtOnboardingLocalizations.current.error_process_file,