Skip to content

Commit 87ef7bb

Browse files
committed
Updated project dependencies and make it null-safe.
1 parent 12cbb0b commit 87ef7bb

28 files changed

+87
-193
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
build/
77
.packages
88
pubspec.lock
9+
*.iml
910

1011
# iOS not required for this plugin
1112
ios/**
13+
windows/**
14+
macos/**

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 1.0.0
2+
3+
- Null Safety Migration (Finally!)
4+
- Thanks to Rexios and Peter Ullrich.
5+
- Min Dart 2.12 / Flutter 2.5
6+
- Updated native component versions:
7+
- Gradle 6.5
8+
- Android Gradle Plugin 4.1.0
9+
- Android compileSdkVersion 31
10+
- AndroidX Wear 1.2.0
11+
- Kotlin 1.5.10
12+
- Removed `jcenter()` repo requirement.
13+
114
# 0.1.1
215

316
- Fix Kotlin/Android compileOnly dep on com.google.android.wearable:wearable.

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ A plugin that offers Flutter support for Wear OS by Google (Android Wear).
55
__To use this plugin you must set your `minSdkVersion` to `23`.__
66

77

8+
# Tutorial
9+
10+
https://medium.com/flutter-community/flutter-building-wearos-app-fedf0f06d1b4
11+
12+
813
# Widgets
914

1015
There currently three widgets provided by the plugin:
@@ -15,22 +20,22 @@ There currently three widgets provided by the plugin:
1520

1621
## Example
1722

18-
Typically all three of these widgets would be used near the root of your app's widget tree:
23+
Typically, all three of these widgets would be used near the root of your app's widget tree:
1924

2025
```dart
2126
class WatchScreen extends StatelessWidget {
2227
@override
2328
Widget build(BuildContext context) {
2429
return WatchShape(
25-
builder: (context, shape, child) {
30+
builder: (BuildContext context, WearShape shape, Widget? child) {
2631
return AmbientMode(
2732
builder: (context, mode, child) {
2833
return mode == Mode.active ? ActiveWatchFace() : AmbientWatchFace();
2934
},
3035
);
3136
},
3237
);
33-
},
38+
}
3439
}
3540
```
3641

android/.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
*.iml
22
.gradle
3-
/local.properties
4-
/.idea/workspace.xml
5-
/.idea/libraries
3+
local.properties
64
.DS_Store
7-
/build
5+
.idea/
6+
build/
87
/captures

android/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ group 'com.mjohnsullivan.flutterwear.wear'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.3.50'
5+
ext.kotlin_version = '1.5.10'
66
repositories {
77
google()
8-
jcenter()
8+
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.5.4'
12+
classpath 'com.android.tools.build:gradle:4.1.0'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
1616

1717
rootProject.allprojects {
1818
repositories {
1919
google()
20-
jcenter()
20+
mavenCentral()
2121
}
2222
}
2323

@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
2626
//apply plugin: 'kotlin-android-extensions'
2727

2828
android {
29-
compileSdkVersion 29
29+
compileSdkVersion 31
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'
@@ -42,9 +42,9 @@ android {
4242
dependencies {
4343
//implementation "androidx.core:core-ktx:+"
4444
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
45-
implementation 'androidx.wear:wear:1.0.0'
45+
implementation 'androidx.wear:wear:1.2.0'
4646
implementation 'com.google.android.support:wearable:2.8.1'
4747
compileOnly 'com.google.android.wearable:wearable:2.8.1'
4848

49-
// compileOnly files('C:\\Android\\flutter\\bin\\cache\\artifacts\\engine\\android-x64\\flutter.jar')
49+
compileOnly files('C:\\Android\\flutter\\bin\\cache\\artifacts\\engine\\android-x64\\flutter.jar')
5050
}

android/gradle.properties

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

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

example/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
.packages
3030
.pub-cache/
3131
.pub/
32-
/build/
32+
build/
3333

3434
# Web related
3535
lib/generated_plugin_registrant.dart
@@ -42,3 +42,5 @@ app.*.map.json
4242

4343
# iOS not required for this plugin
4444
ios/**
45+
windows/**
46+
macos/**

example/.idea/libraries/Dart_SDK.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

example/.idea/modules.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)