Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove QR upload #816

Merged
merged 5 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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