Skip to content
This repository was archived by the owner on Jul 11, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package android

group 'fr.g123k.flutterappbadge.flutterappbadger'
version '1.0-SNAPSHOT'

Expand All @@ -22,7 +24,7 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 29
compileSdk 34

defaultConfig {
minSdkVersion 16
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
package android

rootProject.name = 'flutter_app_badger'
4 changes: 1 addition & 3 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.g123k.flutterappbadge.flutterappbadger">
</manifest>
<manifest package="fr.g123k.flutterappbadge.flutterappbadger" />
9 changes: 6 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdk 34

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "fr.g123k.flutterappbadger.flutterappbadgerexample"
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -38,6 +37,10 @@ android {
signingConfig signingConfigs.debug
}
}

if (project.android.hasProperty('namespace')) {
namespace 'fr.g123k.flutterappbadge.flutterappbadger'
}
}

flutter {
Expand Down
2 changes: 2 additions & 0 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package example.android

buildscript {
repositories {
google()
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ class _MyAppState extends State<MyApp> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
new Text('Badge supported: $_appBadgeSupported\n'),
new RaisedButton(
new MaterialButton(
child: new Text('Add badge'),
onPressed: () {
_addBadge();
},
),
new RaisedButton(
new MaterialButton(
child: new Text('Remove badge'),
onPressed: () {
_removeBadge();
Expand Down