Skip to content

Commit

Permalink
Merge pull request Purus#43 from broderbluff/toast-toggle-and-custom-…
Browse files Browse the repository at this point in the history
…toast-message

Added toggle for toast and custom toast text
  • Loading branch information
Purus authored Aug 15, 2022
2 parents 8dde464 + 903adf3 commit e007b1d
Show file tree
Hide file tree
Showing 10 changed files with 367 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .dart_tool/package_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"configVersion": 2,
"packages": [
{
"name": "characters",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "collection",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "flutter",
"rootUri": "file:///C:/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "meta",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "sky_engine",
"rootUri": "file:///C:/flutter/bin/cache/pkg/sky_engine",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "typed_data",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "vector_math",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.1",
"packageUri": "lib/",
"languageVersion": "2.14"
},
{
"name": "launch_review",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "2.12"
}
],
"generated": "2021-12-10T11:10:32.367987Z",
"generator": "pub",
"generatorVersion": "2.15.0"
}
33 changes: 33 additions & 0 deletions .dart_tool/package_config_subset
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
launch_review
2.12
file:///C:/Users/patrik/dev/git%20projects/launch_review/
file:///C:/Users/patrik/dev/git%20projects/launch_review/lib/
characters
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.2.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.2.0/lib/
collection
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0/lib/
meta
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/
typed_data
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0/lib/
vector_math
2.14
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.1/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.1/lib/
sky_engine
2.12
file:///C:/flutter/bin/cache/pkg/sky_engine/
file:///C:/flutter/bin/cache/pkg/sky_engine/lib/
flutter
2.12
file:///C:/flutter/packages/flutter/
file:///C:/flutter/packages/flutter/lib/
2
1 change: 1 addition & 0 deletions .dart_tool/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.8.0
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,16 @@ public static void registerWith(PluginRegistry.Registrar registrar) {
public void onMethodCall(MethodCall call, Result result) {
if (call.method.equals("launch")) {
String appId = call.argument("android_id");
String toastMessage = call.argument("toast_message");
boolean showToast = call.argument("show_toast");

if (appId == null) {
appId = activity.getPackageName();
}

if (toastMessage == null){
toastMessage = "Please Rate Application";
}
Intent rateIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?id=" + appId));
boolean marketFound = false;
Expand Down Expand Up @@ -78,6 +83,9 @@ public void onMethodCall(MethodCall call, Result result) {
// this make sure only the Google Play app is allowed to
// intercept the intent
rateIntent.setComponent(componentName);
if (showToast){
Toast.makeText(activity, toastMessage, Toast.LENGTH_SHORT).show();
}

activity.startActivity(rateIntent);
marketFound = true;
Expand Down
152 changes: 152 additions & 0 deletions example/.dart_tool/package_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"configVersion": 2,
"packages": [
{
"name": "async",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.2",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "boolean_selector",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "characters",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "charcode",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.3.1",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "clock",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.1.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "collection",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "cupertino_icons",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "fake_async",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "flutter",
"rootUri": "file:///C:/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "flutter_test",
"rootUri": "file:///C:/flutter/packages/flutter_test",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "launch_review",
"rootUri": "../../",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "matcher",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.11",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "meta",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "path",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.8.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "sky_engine",
"rootUri": "file:///C:/flutter/bin/cache/pkg/sky_engine",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "source_span",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.1",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "stack_trace",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "stream_channel",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "string_scanner",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "term_glyph",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "test_api",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.3",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "typed_data",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0",
"packageUri": "lib/",
"languageVersion": "2.12"
},
{
"name": "vector_math",
"rootUri": "file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.1",
"packageUri": "lib/",
"languageVersion": "2.14"
},
{
"name": "launch_review_example",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "2.10"
}
],
"generated": "2021-12-10T11:10:35.156087Z",
"generator": "pub",
"generatorVersion": "2.15.0"
}
97 changes: 97 additions & 0 deletions example/.dart_tool/package_config_subset
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
launch_review
2.12
file:///C:/Users/patrik/dev/git%20projects/launch_review/
file:///C:/Users/patrik/dev/git%20projects/launch_review/lib/
async
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.2/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.2/lib/
boolean_selector
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/
characters
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.2.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.2.0/lib/
charcode
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.3.1/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.3.1/lib/
clock
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.1.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.1.0/lib/
collection
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.15.0/lib/
cupertino_icons
2.0
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/
fake_async
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.2.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.2.0/lib/
matcher
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.11/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.11/lib/
meta
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/
path
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.8.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.8.0/lib/
source_span
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.1/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.1/lib/
stack_trace
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0/lib/
stream_channel
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0/lib/
string_scanner
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/
term_glyph
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.0/lib/
test_api
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.3/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.3/lib/
typed_data
2.12
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.0/lib/
vector_math
2.14
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.1/
file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.1/lib/
sky_engine
2.12
file:///C:/flutter/bin/cache/pkg/sky_engine/
file:///C:/flutter/bin/cache/pkg/sky_engine/lib/
flutter
2.12
file:///C:/flutter/packages/flutter/
file:///C:/flutter/packages/flutter/lib/
flutter_test
2.12
file:///C:/flutter/packages/flutter_test/
file:///C:/flutter/packages/flutter_test/lib/
launch_review_example
2.10
file:///C:/Users/patrik/dev/git%20projects/launch_review/example/
file:///C:/Users/patrik/dev/git%20projects/launch_review/example/lib/
2
1 change: 1 addition & 0 deletions example/.dart_tool/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.8.0
1 change: 1 addition & 0 deletions example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"launch_review","path":"C:\\\\Users\\\\patrik\\\\dev\\\\git projects\\\\launch_review\\\\","dependencies":[]}],"android":[{"name":"launch_review","path":"C:\\\\Users\\\\patrik\\\\dev\\\\git projects\\\\launch_review\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"launch_review","dependencies":[]}],"date_created":"2021-12-10 12:10:35.211148","version":"2.8.0"}
13 changes: 13 additions & 0 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\patrik\dev\git projects\launch_review\example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
Loading

0 comments on commit e007b1d

Please sign in to comment.