Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 276d86d

Browse files
fix Android V2 embedding
1 parent 48c201b commit 276d86d

File tree

11 files changed

+69
-38
lines changed

11 files changed

+69
-38
lines changed

‎.idea/workspace.xml

Lines changed: 34 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,8 @@
9393

9494
## 1.1.1
9595

96-
* try to fix Android V2 embedding
96+
* try to fix Android V2 embedding
97+
98+
## 1.2
99+
100+
* fix Android V2 embedding

‎android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android {
2525
compileSdkVersion 28
2626

2727
defaultConfig {
28-
minSdkVersion 16
28+
minSdkVersion 20
2929
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3030
}
3131
lintOptions {

‎android/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
org.gradle.jvmargs=-Xmx1536M
2+
android.useAndroidX=true
3+
android.enableJetifier=true
24

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
package yy.inc.flutter_custom_dialog;
22

3+
import androidx.annotation.NonNull;
4+
5+
import io.flutter.embedding.engine.plugins.FlutterPlugin;
36
import io.flutter.plugin.common.MethodCall;
47
import io.flutter.plugin.common.MethodChannel;
58
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
69
import io.flutter.plugin.common.MethodChannel.Result;
7-
import io.flutter.plugin.common.PluginRegistry.Registrar;
810

911
/** FlutterCustomDialogPlugin */
10-
public class FlutterCustomDialogPlugin implements MethodCallHandler {
11-
/** Plugin registration. */
12-
public static void registerWith(Registrar registrar) {
13-
final MethodChannel channel = new MethodChannel(registrar.messenger(), "flutter_custom_dialog");
14-
channel.setMethodCallHandler(new FlutterCustomDialogPlugin());
12+
public class FlutterCustomDialogPlugin implements FlutterPlugin, MethodCallHandler {
13+
14+
private MethodChannel channel;
15+
16+
@Override
17+
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
18+
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_custom_dialog");
19+
channel.setMethodCallHandler(this);
1520
}
1621

1722
@Override
18-
public void onMethodCall(MethodCall call, Result result) {
23+
public void onMethodCall(@NonNullMethodCall call,@NonNull Result result) {
1924
if (call.method.equals("getPlatformVersion")) {
2025
result.success("Android " + android.os.Build.VERSION.RELEASE);
2126
} else {
2227
result.notImplemented();
2328
}
2429
}
30+
31+
@Override
32+
public void onDetachedFromEngine(FlutterPluginBinding binding) {
33+
channel.setMethodCallHandler(null);
34+
}
2535
}

‎example/.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021年10月22日 15:36:17.074586","version":"2.5.3"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021年10月22日 16:32:26.122793","version":"2.5.3"}

‎example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
defaultConfig {
3535
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3636
applicationId "yy.inc.flutter_custom_dialog_example"
37-
minSdkVersion 16
37+
minSdkVersion 20
3838
targetSdkVersion 28
3939
versionCode flutterVersionCode.toInteger()
4040
versionName flutterVersionName

‎example/android/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
org.gradle.jvmargs=-Xmx1536M
2-
2+
android.useAndroidX=true
3+
android.enableJetifier=true

‎example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ packages:
6868
path: ".."
6969
relative: true
7070
source: path
71-
version: "1.1.0"
71+
version: "1.1.1"
7272
flutter_test:
7373
dependency: "direct dev"
7474
description: flutter

‎pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.6.1"
10+
version: "2.8.1"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -28,7 +28,7 @@ packages:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.2.0"
31+
version: "1.3.1"
3232
clock:
3333
dependency: transitive
3434
description:
@@ -73,7 +73,7 @@ packages:
7373
name: meta
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "1.3.0"
76+
version: "1.7.0"
7777
path:
7878
dependency: transitive
7979
description:
@@ -127,7 +127,7 @@ packages:
127127
name: test_api
128128
url: "https://pub.dartlang.org"
129129
source: hosted
130-
version: "0.3.0"
130+
version: "0.4.2"
131131
typed_data:
132132
dependency: transitive
133133
description:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /