From f6e03fd0d971f2eb50bd250071e9133286594de7 Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 18 Jan 2021 10:14:25 -0500 Subject: [PATCH] Switch to flutter embedding v2 --- .flutter-plugins-dependencies | 2 +- android/app/src/main/AndroidManifest.xml | 6 +-- .../co/banano/natriumwallet/MainActivity.java | 43 ++++++++----------- pubspec.yaml | 2 +- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 64a24ce3..ff0a5cb8 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"barcode_scan","path":"/home/brandon/flutter/.pub-cache/git/flutter_barcode_reader-545aa259bd67d9ce9a32f342bddd5a13a9079e4d/","dependencies":[]},{"name":"vibrate","path":"/home/brandon/flutter/.pub-cache/git/flutter_vibrate-8f9f1c20179ddf41003fcccf8a984fdeeaca1adc/","dependencies":[]},{"name":"share","path":"/home/brandon/flutter/.pub-cache/git/plugins-900165b300b16489bf2b5d4a55b30be7c799293f/packages/share/","dependencies":[]},{"name":"root_checker","path":"/home/brandon/flutter/.pub-cache/git/root_checker-43d86d620a5b113cd9e0f06e933e225437e779b8/","dependencies":[]},{"name":"uni_links","path":"/home/brandon/flutter/.pub-cache/git/uni_links-c3072f83690da166d0942c92283f6fdd08c59c26/","dependencies":[]},{"name":"device_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-1.0.0/","dependencies":[]},{"name":"file_picker","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.13.3/","dependencies":[]},{"name":"firebase_core","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.0/","dependencies":[]},{"name":"firebase_messaging","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/","dependencies":["firebase_core"]},{"name":"flutter_nano_ffi","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_nano_ffi-1.0.3/","dependencies":[]},{"name":"flutter_secure_storage","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/","dependencies":[]},{"name":"flutter_webview_plugin","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/","dependencies":[]},{"name":"local_auth","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/local_auth-0.6.3+1/","dependencies":[]},{"name":"package_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3+2/","dependencies":[]},{"name":"path_provider","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.10/","dependencies":[]},{"name":"shared_preferences","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/","dependencies":[]},{"name":"sqflite","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+2/","dependencies":[]}],"android":[{"name":"barcode_scan","path":"/home/brandon/flutter/.pub-cache/git/flutter_barcode_reader-545aa259bd67d9ce9a32f342bddd5a13a9079e4d/","dependencies":[]},{"name":"vibrate","path":"/home/brandon/flutter/.pub-cache/git/flutter_vibrate-8f9f1c20179ddf41003fcccf8a984fdeeaca1adc/","dependencies":[]},{"name":"share","path":"/home/brandon/flutter/.pub-cache/git/plugins-900165b300b16489bf2b5d4a55b30be7c799293f/packages/share/","dependencies":[]},{"name":"root_checker","path":"/home/brandon/flutter/.pub-cache/git/root_checker-43d86d620a5b113cd9e0f06e933e225437e779b8/","dependencies":[]},{"name":"uni_links","path":"/home/brandon/flutter/.pub-cache/git/uni_links-c3072f83690da166d0942c92283f6fdd08c59c26/","dependencies":[]},{"name":"device_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-1.0.0/","dependencies":[]},{"name":"file_picker","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.13.3/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_core","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.0/","dependencies":[]},{"name":"firebase_messaging","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/","dependencies":["firebase_core"]},{"name":"flutter_nano_ffi","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_nano_ffi-1.0.3/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.8/","dependencies":[]},{"name":"flutter_secure_storage","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/","dependencies":[]},{"name":"flutter_webview_plugin","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/","dependencies":[]},{"name":"local_auth","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/local_auth-0.6.3+1/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3+2/","dependencies":[]},{"name":"path_provider","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.10/","dependencies":[]},{"name":"shared_preferences","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/","dependencies":[]},{"name":"sqflite","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+2/","dependencies":[]}],"macos":[{"name":"firebase_core","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.0/","dependencies":[]},{"name":"package_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3+2/","dependencies":[]},{"name":"path_provider_macos","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_macos","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+1/","dependencies":[]},{"name":"shared_preferences_linux","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-0.0.2+2/","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_windows","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-0.0.1+3/","dependencies":["path_provider_windows"]}],"web":[{"name":"firebase_core_web","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-0.2.0/","dependencies":[]},{"name":"shared_preferences_web","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+7/","dependencies":[]}]},"dependencyGraph":[{"name":"barcode_scan","dependencies":[]},{"name":"vibrate","dependencies":[]},{"name":"share","dependencies":[]},{"name":"root_checker","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"device_info","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core"]},{"name":"flutter_nano_ffi","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"flutter_webview_plugin","dependencies":[]},{"name":"local_auth","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]}],"date_created":"2021-01-18 09:45:41.660888","version":"1.22.5"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"barcode_scan","path":"/home/brandon/flutter/.pub-cache/git/flutter_barcode_reader-545aa259bd67d9ce9a32f342bddd5a13a9079e4d/","dependencies":[]},{"name":"vibrate","path":"/home/brandon/flutter/.pub-cache/git/flutter_vibrate-8f9f1c20179ddf41003fcccf8a984fdeeaca1adc/","dependencies":[]},{"name":"share","path":"/home/brandon/flutter/.pub-cache/git/plugins-900165b300b16489bf2b5d4a55b30be7c799293f/packages/share/","dependencies":[]},{"name":"root_checker","path":"/home/brandon/flutter/.pub-cache/git/root_checker-43d86d620a5b113cd9e0f06e933e225437e779b8/","dependencies":[]},{"name":"uni_links","path":"/home/brandon/flutter/.pub-cache/git/uni_links-c3072f83690da166d0942c92283f6fdd08c59c26/","dependencies":[]},{"name":"device_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-1.0.0/","dependencies":[]},{"name":"file_picker","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.13.3/","dependencies":[]},{"name":"firebase_core","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.0/","dependencies":[]},{"name":"firebase_messaging","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/","dependencies":["firebase_core"]},{"name":"flutter_nano_ffi","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_nano_ffi-1.0.3/","dependencies":[]},{"name":"flutter_secure_storage","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/","dependencies":[]},{"name":"flutter_webview_plugin","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/","dependencies":[]},{"name":"local_auth","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/local_auth-0.6.3+4/","dependencies":[]},{"name":"package_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3+2/","dependencies":[]},{"name":"path_provider","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.27/","dependencies":[]},{"name":"shared_preferences","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/","dependencies":[]},{"name":"sqflite","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.2+2/","dependencies":[]}],"android":[{"name":"barcode_scan","path":"/home/brandon/flutter/.pub-cache/git/flutter_barcode_reader-545aa259bd67d9ce9a32f342bddd5a13a9079e4d/","dependencies":[]},{"name":"vibrate","path":"/home/brandon/flutter/.pub-cache/git/flutter_vibrate-8f9f1c20179ddf41003fcccf8a984fdeeaca1adc/","dependencies":[]},{"name":"share","path":"/home/brandon/flutter/.pub-cache/git/plugins-900165b300b16489bf2b5d4a55b30be7c799293f/packages/share/","dependencies":[]},{"name":"root_checker","path":"/home/brandon/flutter/.pub-cache/git/root_checker-43d86d620a5b113cd9e0f06e933e225437e779b8/","dependencies":[]},{"name":"uni_links","path":"/home/brandon/flutter/.pub-cache/git/uni_links-c3072f83690da166d0942c92283f6fdd08c59c26/","dependencies":[]},{"name":"device_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/device_info-1.0.0/","dependencies":[]},{"name":"file_picker","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.13.3/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_core","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.0/","dependencies":[]},{"name":"firebase_messaging","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/","dependencies":["firebase_core"]},{"name":"flutter_nano_ffi","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_nano_ffi-1.0.3/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.8/","dependencies":[]},{"name":"flutter_secure_storage","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.5/","dependencies":[]},{"name":"flutter_webview_plugin","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.11/","dependencies":[]},{"name":"local_auth","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/local_auth-0.6.3+4/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3+2/","dependencies":[]},{"name":"path_provider","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.27/","dependencies":[]},{"name":"shared_preferences","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/","dependencies":[]},{"name":"sqflite","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.2+2/","dependencies":[]}],"macos":[{"name":"firebase_core","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.0/","dependencies":[]},{"name":"package_info","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.3+2/","dependencies":[]},{"name":"path_provider_macos","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_macos","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.2+2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+1/","dependencies":[]},{"name":"shared_preferences_linux","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-0.0.2+2/","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_windows","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-0.0.1+3/","dependencies":["path_provider_windows"]}],"web":[{"name":"firebase_core_web","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-0.2.0/","dependencies":[]},{"name":"shared_preferences_web","path":"/home/brandon/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+7/","dependencies":[]}]},"dependencyGraph":[{"name":"barcode_scan","dependencies":[]},{"name":"vibrate","dependencies":[]},{"name":"share","dependencies":[]},{"name":"root_checker","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"device_info","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core"]},{"name":"flutter_nano_ffi","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"flutter_webview_plugin","dependencies":[]},{"name":"local_auth","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]}],"date_created":"2021-01-18 10:12:12.151820","version":"1.22.5"} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index db03481d..1128717d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -22,6 +22,9 @@ android:label="Natrium" android:icon="@mipmap/ic_launcher" android:allowBackup="false"> + @@ -36,9 +39,6 @@ until Flutter renders its first frame. It can be removed if there is no splash screen (such as the default splash screen defined in @style/LaunchTheme). --> - diff --git a/android/app/src/main/java/co/banano/natriumwallet/MainActivity.java b/android/app/src/main/java/co/banano/natriumwallet/MainActivity.java index 78d0a45a..2d3903a7 100644 --- a/android/app/src/main/java/co/banano/natriumwallet/MainActivity.java +++ b/android/app/src/main/java/co/banano/natriumwallet/MainActivity.java @@ -2,33 +2,28 @@ import android.os.Bundle; -import io.flutter.app.FlutterFragmentActivity; -import io.flutter.plugin.common.MethodCall; +import androidx.annotation.NonNull; +import io.flutter.embedding.android.FlutterFragmentActivity; +import io.flutter.embedding.engine.FlutterEngine; import io.flutter.plugin.common.MethodChannel; import io.flutter.plugins.GeneratedPluginRegistrant; import io.flutter.view.FlutterMain; public class MainActivity extends FlutterFragmentActivity { - private static final String CHANNEL = "fappchannel"; + private static final String CHANNEL = "fappchannel"; - @Override - protected void onCreate(Bundle savedInstanceState) { - FlutterMain.startInitialization(this); - super.onCreate(savedInstanceState); - - GeneratedPluginRegistrant.registerWith(this); - - new MethodChannel(getFlutterView(), CHANNEL).setMethodCallHandler( - new MethodChannel.MethodCallHandler() { - @Override - public void onMethodCall(MethodCall call, MethodChannel.Result result) { - if (call.method.equals("getSecret")) { - result.success(new LegacyStorage().getSecret()); - } else { - result.notImplemented(); - } - } - } - ); - } -} + @Override + public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { + GeneratedPluginRegistrant.registerWith(flutterEngine); + new MethodChannel(flutterEngine.getDartExecutor().getBinaryMessenger(), CHANNEL) + .setMethodCallHandler( + (call, result) -> { + if (call.method.equals("getSecret")) { + result.success(new LegacyStorage().getSecret()); + } else { + result.notImplemented(); + } + } + ); + } +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 5d3d3a0a..1893fbee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,7 +67,7 @@ dependencies: event_taxi: ^0.1.5 # SVG - flutter_svg: ^0.19.2+1 + flutter_svg: ^0.18.1 # QR Codes qr_flutter: ^2.0.1 # Generator