From 7f8cbbffae343e0bde670a9cd561dacb743a8cf0 Mon Sep 17 00:00:00 2001 From: Kseniia Nikitina Date: Sat, 10 Aug 2024 22:10:08 +0200 Subject: [PATCH] Release v0.0.9 (#10) * chore: update flutter, prepare to 0.0.9 * chore: update example --- .fvmrc | 2 +- .gitignore | 6 ++++-- example/ios/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/AppDelegate.swift | 2 +- example/lib/main.dart | 16 +++++++++++----- example_full/.gitignore | 3 +++ .../ios/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example_full/ios/Runner/AppDelegate.swift | 2 +- .../lib/presentation/components/info_panel.dart | 6 +++--- .../presentation/view/check_service_view.dart | 12 +++++++----- .../nearby_service_exception_mapper.dart | 2 +- 13 files changed, 36 insertions(+), 23 deletions(-) diff --git a/.fvmrc b/.fvmrc index 7626778..64a9dcb 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,4 +1,4 @@ { - "flutter": "3.10.6", + "flutter": "3.24.0", "flavors": {} } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 06f4e7d..a7e8cc0 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,6 @@ migrate_working_dir/ *.ipr *.iws .idea/ -.fvm # The .vscode folder contains launch configuration and tasks you configure in # VS Code which you may wish to be included in version control, so this line @@ -32,4 +31,7 @@ build/ .metadata **/pubspec.lock -**/Podfile.lock \ No newline at end of file +**/Podfile.lock + +# FVM Version Cache +.fvm/ \ No newline at end of file diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 86cc64e..aa1e122 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -215,7 +215,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 93d90ac..2eff517 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ { _nearbyService.startCommunicationChannel( NearbyCommunicationChannelData( device.info.id, - filesListener: NearbyServiceFilesListener(onData: _filesListener), + filesListener: NearbyServiceFilesListener( + onData: (pack) => _filesListener(Scaffold.of(context).context, pack), + ), messagesListener: NearbyServiceMessagesListener( onData: _messagesListener, onCreated: () { @@ -329,10 +331,14 @@ class _AppBodyState extends State { ); } - void _filesListener(ReceivedNearbyFilesPack pack) { - FilesSaver.savePack(pack).then( - (value) => AppSnackBar.show(context, title: 'Files pack was saved'), - ); + Future _filesListener( + BuildContext context, + ReceivedNearbyFilesPack pack, + ) async { + await FilesSaver.savePack(pack); + if (context.mounted) { + AppSnackBar.show(context, title: 'Files pack was saved'); + } } Future _send(NearbyMessageContent content) async { diff --git a/example_full/.gitignore b/example_full/.gitignore index 29a3a50..75dfa95 100644 --- a/example_full/.gitignore +++ b/example_full/.gitignore @@ -41,3 +41,6 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# FVM Version Cache +.fvm/ \ No newline at end of file diff --git a/example_full/ios/Runner.xcodeproj/project.pbxproj b/example_full/ios/Runner.xcodeproj/project.pbxproj index 9679f29..6b1eed1 100644 --- a/example_full/ios/Runner.xcodeproj/project.pbxproj +++ b/example_full/ios/Runner.xcodeproj/project.pbxproj @@ -216,7 +216,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { diff --git a/example_full/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example_full/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a0..8e3ca5d 100644 --- a/example_full/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example_full/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ { setState(() { showEnableButton = true; }); - AppShackBar.show( - context, - 'Please enable Wi-fi', - actionType: ActionType.warning, - ); + if (context.mounted) { + AppShackBar.show( + context, + 'Please enable Wi-fi', + actionType: ActionType.warning, + ); + } } }); }, diff --git a/lib/src/interface/nearby_service_exception_mapper.dart b/lib/src/interface/nearby_service_exception_mapper.dart index 487d299..e96c520 100644 --- a/lib/src/interface/nearby_service_exception_mapper.dart +++ b/lib/src/interface/nearby_service_exception_mapper.dart @@ -19,4 +19,4 @@ abstract class NearbyServiceExceptionMapper { bool canMap(String error); NearbyServiceException map(String error); -} \ No newline at end of file +}