Skip to content

Commit

Permalink
Merge pull request #816 from atsign-foundation/feat/remove_qr
Browse files Browse the repository at this point in the history
feat: remove QR upload
  • Loading branch information
Sardar1208 authored Feb 26, 2024
2 parents 437c720 + 9bd47c7 commit 4b4a7d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class LocationSharingFor {

Map<String, dynamic> 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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ class Coords<T extends num> extends CustomPoint<T> {
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;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/at_onboarding_flutter/example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class _AtOnboardingHomeScreenState extends State<AtOnboardingHomeScreen> {
bool permissionGrated = false;

bool _isContinue = true;
bool _uploadingQRCode = false;
String? _pairingAtsign;

ServerStatus? atSignStatus;
Expand Down Expand Up @@ -721,61 +720,6 @@ class _AtOnboardingHomeScreenState extends State<AtOnboardingHomeScreen> {
),
),
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
Expand Down Expand Up @@ -1012,12 +956,10 @@ class _AtOnboardingHomeScreenState extends State<AtOnboardingHomeScreen> {
try {
String? aesKey, atsign;
setState(() {
_uploadingQRCode = true;
});
String? path = await _desktopQRFilePicker();
if (path == null) {
setState(() {
_uploadingQRCode = false;
});
return;
}
Expand Down Expand Up @@ -1049,19 +991,16 @@ class _AtOnboardingHomeScreenState extends State<AtOnboardingHomeScreen> {
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,
Expand Down

0 comments on commit 4b4a7d5

Please sign in to comment.