Skip to content

Commit

Permalink
Updated for the new Flutter version (fixes Skyost#95).
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyost committed Mar 3, 2021
1 parent bf17efa commit 63be9d6
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 87 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 1.0.0
* Null safety migration
* Null safety migration.
* Updated for Flutter v2.0.0.

## 0.7.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar

/**
* The Rate my app plugin main class.
* A lot of thanks to https://github.com/britannio/in_app_review and its author (This class is a lot inspired by it).
* A lot of thanks to https://github.com/britannio/in_app_review and its author (This class has been inspired by his work).
*/
public class RateMyAppPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
private var activity: Activity? = null
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
4 changes: 2 additions & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Aug 07 13:58:13 CEST 2020
#Wed Nov 04 23:36:22 CET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\:https://services.gradle.org/distributions/gradle-6.5-bin.zip
20 changes: 10 additions & 10 deletions example/lib/content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@ class _ContentWidgetState extends State<ContentWidget> {
'Are conditions met ? ' + (shouldOpenDialog ? 'Yes' : 'No')),
Padding(
padding: const EdgeInsets.only(top: 10),
child: RaisedButton(
child: const Text('Launch "Rate my app" dialog'),
child: ElevatedButton(
onPressed: () async {
await widget.rateMyApp.showRateDialog(
context); // We launch the default Rate my app dialog.
refresh();
},
child: const Text('Launch "Rate my app" dialog'),
),
),
RaisedButton(
child: const Text('Launch "Rate my app" star dialog'),
ElevatedButton(
onPressed: () async {
await widget.rateMyApp.showStarRateDialog(context,
actionsBuilder: (_, stars) => starRateDialogActionsBuilder(
context,
stars)); // We launch the Rate my app dialog with stars.
refresh();
},
child: const Text('Launch "Rate my app" star dialog'),
),
RaisedButton(
child: const Text('Reset'),
ElevatedButton(
onPressed: () async {
await widget.rateMyApp
.reset(); // We reset all Rate my app conditions values.
refresh();
},
child: const Text('Reset'),
),
],
),
Expand Down Expand Up @@ -128,12 +128,10 @@ class _ContentWidgetState extends State<ContentWidget> {
}

return [
FlatButton(
child:
Text(MaterialLocalizations.of(context).okButtonLabel.toUpperCase()),
TextButton(
onPressed: () async {
print(message);
Scaffold.of(context).showSnackBar(
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(message),
backgroundColor: color,
Expand All @@ -147,6 +145,8 @@ class _ContentWidgetState extends State<ContentWidget> {
context, RateMyAppDialogButton.rate);
refresh();
},
child:
Text(MaterialLocalizations.of(context).okButtonLabel.toUpperCase()),
),
cancelButton,
];
Expand Down
74 changes: 37 additions & 37 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.3"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.5"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.3"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.5"
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -56,21 +56,21 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.3"
version: "1.2.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0-nullsafety.1"
version: "1.0.0"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.0-nullsafety.4"
version: "6.1.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -92,56 +92,56 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.3"
version: "0.6.3"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.3"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.6"
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.3"
version: "1.8.0"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0-nullsafety"
version: "2.0.0"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety"
version: "2.0.1"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0-nullsafety.2"
version: "2.0.0"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
version: "1.11.0"
platform:
dependency: transitive
description:
Expand All @@ -155,14 +155,14 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.2"
version: "2.0.0"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0-nullsafety.4"
version: "4.1.0"
rate_my_app:
dependency: "direct main"
description:
Expand All @@ -176,42 +176,42 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety"
version: "2.0.3"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4-nullsafety"
version: "2.0.0"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2-nullsafety"
version: "2.0.0"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety"
version: "2.0.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0-nullsafety"
version: "2.0.0"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.3-nullsafety"
version: "2.0.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -230,70 +230,70 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.4"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.6"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.3"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.6"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.5"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.5"
version: "2.1.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety.10"
version: "2.0.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0-nullsafety.1"
version: "0.2.0"
sdks:
dart: ">=2.12.0-259.8.beta <3.0.0"
flutter: ">=1.12.13+hotfix.5"
dart: ">=2.12.0-259.9.beta <3.0.0"
flutter: ">=2.0.0"
Loading

0 comments on commit 63be9d6

Please sign in to comment.