Commit a92fbe27 by Karthik Ponnam Committed by GitHub

Merge pull request #56 from lane128/fix_issue_55

fix issue 55
parents b51a54a6 708822a6
......@@ -38,7 +38,7 @@ static NSString *const CHANNEL_NAME = @"PonnamKarthik/fluttertoast";
- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result {
if([@"cancel" isEqualToString:call.method]) {
[[UIApplication sharedApplication].delegate.window.rootViewController.view hideAllToasts];
result(true);
result([NSNumber numberWithBool:true]);
} else if ([@"showToast" isEqualToString:call.method]) {
NSString *msg = call.arguments[@"msg"];
NSString *gravity = call.arguments[@"gravity"];
......@@ -84,7 +84,7 @@ static NSString *const CHANNEL_NAME = @"PonnamKarthik/fluttertoast";
style:style
];
}
result(true);
result([NSNumber numberWithBool:true]);
} else {
result(FlutterMethodNotImplemented);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment