Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/0.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-audi committed May 3, 2021
2 parents ca7a306 + e99317f commit 8a3e692
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
17 changes: 17 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,22 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'PERMISSION_EVENTS=0',
'PERMISSION_REMINDERS=0',
'PERMISSION_CONTACTS=0',
#'PERMISSION_CAMERA=0',
'PERMISSION_MICROPHONE=0',
'PERMISSION_SPEECH_RECOGNIZER=0',
'PERMISSION_PHOTOS=0',
'PERMISSION_LOCATION=0',
'PERMISSION_NOTIFICATIONS=0',
'PERMISSION_MEDIA_LIBRARY=0',
'PERMISSION_SENSORS=0',
'PERMISSION_BLUETOOTH=0'
]
end
end
end
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ SPEC CHECKSUMS:
SwiftProtobuf: 4e16842b83c6fda06b10fac50d73b3f1fce8ab7b
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef

PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea
PODFILE CHECKSUM: 369a5dd265c3a98e02ffc0493427fc70d9c648fc

COCOAPODS: 1.10.1
2 changes: 0 additions & 2 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
</dict>
<key>NSCameraUsageDescription</key>
<string>Restore a user account from backup QR code</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Restore a user account from backup QR code</string>
<key>UIFileSharingEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class KeysNewScreenDownloadBloc

String path = documents.path + '/' + fileName;
File imgFile = new File(path);
await imgFile.writeAsBytes(pngBytes);
await imgFile.writeAsBytes(pngBytes, flush: true);
yield KeysNewScreenDownloadSuccess(rendered.shouldShare, path);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class KeysRestoreScreen extends PlatformScaffold {
margin: EdgeInsets.only(top: _marginTopSubmit),
child: KeysRestoreScreenSubmit())
]))
//UISecurityRestore((keys) => _onLoadComplete(context, keys))*/
]),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import 'package:app/src/config/config_color.dart';
import 'package:app/src/features/keys/keys_restore_screen/keys_restore_screen_bloc.dart';
import 'package:app/src/utils/helper/helper_image.dart';
import 'package:app/src/utils/helper/helper_permission.dart';
import 'package:app/src/utils/platform/platform_relative_size.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:permission_handler/permission_handler.dart';

class KeysRestoreScreenScan extends StatelessWidget {
static const String _text = "SCAN";
Expand Down Expand Up @@ -44,9 +46,11 @@ class KeysRestoreScreenScan extends StatelessWidget {
alignment: Alignment.centerRight,
child: HelperImage("icon-qr-code"))
])),
onPressed: () {
BlocProvider.of<KeysRestoreScreenBloc>(context)
.add(KeysRestoreScreenScanned());
onPressed: () async {
if (await HelperPermission.request(Permission.camera)) {
BlocProvider.of<KeysRestoreScreenBloc>(context)
.add(KeysRestoreScreenScanned());
}
});
}
}

0 comments on commit 8a3e692

Please sign in to comment.