Skip to content

Commit

Permalink
Switch to flutter embedding v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bbedward committed Jan 18, 2021
1 parent e3be899 commit f6e03fd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -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"}
{"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"}
6 changes: 3 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
android:label="Natrium"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false">
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_status_bar" />
Expand All @@ -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). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
43 changes: 19 additions & 24 deletions android/app/src/main/java/co/banano/natriumwallet/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6e03fd

Please sign in to comment.