Skip to content

Commit

Permalink
Merge pull request #19 from uhm0311/develop
Browse files Browse the repository at this point in the history
Adjust Future<void> to LaunchReview.launch and fix 'Empty app id' exception even it is not empty.
  • Loading branch information
Purus committed Mar 31, 2020
2 parents ed875bd + 5b0b1a8 commit a85487e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ios/Classes/LaunchReviewPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
if ([@"launch" isEqualToString:call.method]) {
NSString *appId = call.arguments[@"ios_id"] ? [self fetchAppIdFromBundleId] : @"";
NSString *appId = call.arguments[@"ios_id"] ? : [self fetchAppIdFromBundleId];

if (appId == (NSString *)[NSNull null]) {
result([FlutterError errorWithCode:@"ERROR"
Expand Down
2 changes: 1 addition & 1 deletion lib/launch_review.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class LaunchReview {
/// Note: It will not work with the iOS Simulator.
///
/// Set writeReview to false to only show the app store page. Used only in iOS.
static void launch(
static Future<void> launch(
{String androidAppId,
String iOSAppId,
bool writeReview = true,
Expand Down

0 comments on commit a85487e

Please sign in to comment.