From 50057836e7ba73a5b65a987a95a1ae48efb97fcd Mon Sep 17 00:00:00 2001 From: Tomas Radvansky Date: Wed, 16 Sep 2020 11:27:08 +1200 Subject: [PATCH] Migrate Android embedding v2, fix overflow issue --- example/android/app/src/main/AndroidManifest.xml | 11 +++++++++-- .../main/java/com/example/example/MainActivity.java | 13 ------------- example/android/app/src/main/res/values/styles.xml | 4 ++++ example/android/gradle.properties | 1 + lib/src/badge.dart | 2 +- pubspec.yaml | 2 +- 6 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 example/android/app/src/main/java/com/example/example/MainActivity.java diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 1b515f8..0557c08 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -13,11 +13,10 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> + + @@ -35,5 +39,8 @@ + diff --git a/example/android/app/src/main/java/com/example/example/MainActivity.java b/example/android/app/src/main/java/com/example/example/MainActivity.java deleted file mode 100644 index 84f8920..0000000 --- a/example/android/app/src/main/java/com/example/example/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.example; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 00fa441..f09400a 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -5,4 +5,8 @@ Flutter draws its first frame --> @drawable/launch_background + + diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 94adc3a..a673820 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +android.enableR8=true diff --git a/lib/src/badge.dart b/lib/src/badge.dart index c67127a..47614d9 100644 --- a/lib/src/badge.dart +++ b/lib/src/badge.dart @@ -80,7 +80,7 @@ class BadgeState extends State with SingleTickerProviderStateMixin { } else { return Stack( alignment: widget.alignment, - overflow: Overflow.visible, + clipBehavior: Clip.none, children: [ widget.child, BadgePositioned( diff --git a/pubspec.yaml b/pubspec.yaml index 04c807c..901dde8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.9.0 + pedantic: ^1.9.2 environment: sdk: ">=2.2.2 <3.0.0"