Commit 5c9be270 by Karthik Ponnam

iOS Build Failed Fix 7.0.4

parent 071defcd
## [7.0.4]
- iOS Build Failed Fixed #218
- Fixed Cancel Toasts in iOS
## [7.0.3]
- FToast now Fade when showing and hiding the toast
......
......@@ -32,7 +32,7 @@ This one has limited features and no control over UI
```yaml
# add this line to your dependencies
fluttertoast: ^7.0.3
fluttertoast: ^7.0.4
```
```dart
......
......@@ -78,7 +78,7 @@ packages:
path: ".."
relative: true
source: path
version: "7.0.3"
version: "7.0.4"
matcher:
dependency: transitive
description:
......
......@@ -61,7 +61,8 @@ 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];
__weak typeof(self) weakSelf = self;
[[weakSelf _readKeyWindow] hideAllToasts];
result([NSNumber numberWithBool:true]);
} else if ([@"showToast" isEqualToString:call.method]) {
NSString *msg = call.arguments[@"msg"];
......@@ -71,10 +72,11 @@ static NSString *const CHANNEL_NAME = @"PonnamKarthik/fluttertoast";
NSNumber *textcolor = call.arguments[@"textcolor"];
NSNumber *size = call.arguments[@"size"];
NSNumber *fontSize = call.arguments[@"fontSize"];
if(fontSize == nil) {
fontSize = 16.0;
if ([fontSize isKindOfClass:[NSNull class]]) {
fontSize = [[NSNumber alloc] initWithInt:16];
}
CGFloat cgf = [fontSize doubleValue];
int time = 1;
@try {
......
name: fluttertoast
description: Toast Library for Flutter, Easily create toast messages in single line of code
version: 7.0.3
version: 7.0.4
homepage: https://github.com/PonnamKarthik/FlutterToast
issue_tracker: https://github.com/ponnamkarthik/FlutterToast/issues
......
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