Commit a9b19344 by Zac Chan

Fxied more issues

parent 1732e9dc
...@@ -72,9 +72,10 @@ static NSString *const CHANNEL_NAME = @"PonnamKarthik/fluttertoast"; ...@@ -72,9 +72,10 @@ static NSString *const CHANNEL_NAME = @"PonnamKarthik/fluttertoast";
position:CSToastPositionCenter position:CSToastPositionCenter
style:style style:style
completion:^(BOOL didTap){ completion:^(BOOL didTap){
NSNumber *boolNumber = [NSNumber numberWithBool:didTap];
[self.channel invokeMethod:@"onTap" arguments:@{ [self.channel invokeMethod:@"onTap" arguments:@{
@"didTao" : didTap @"didTap" : boolNumber
}]; }];
......
...@@ -98,6 +98,28 @@ extern const NSString * CSToastPositionBottom; ...@@ -98,6 +98,28 @@ extern const NSString * CSToastPositionBottom;
- (void)makeToast:(NSString *)message - (void)makeToast:(NSString *)message
duration:(NSTimeInterval)duration duration:(NSTimeInterval)duration
position:(id)position position:(id)position
style:(CSToastStyle *)style
completion:(void(^)(BOOL didTap))completion;
/**
Creates and presents a new toast view with a message, title, and image. Duration,
position, and style can be set explicitly. The completion block executes when the
toast view completes. `didTap` will be `YES` if the toast view was dismissed from
a tap.
@param message The message to be displayed
@param duration The toast duration
@param position The toast's center point. Can be one of the predefined CSToastPosition
constants or a `CGPoint` wrapped in an `NSValue` object.
@param title The title
@param image The image
@param style The style. The shared style will be used when nil
@param completion The completion block, executed after the toast view disappears.
didTap will be `YES` if the toast view was dismissed from a tap.
*/
- (void)makeToast:(NSString *)message
duration:(NSTimeInterval)duration
position:(id)position
title:(NSString *)title title:(NSString *)title
image:(UIImage *)image image:(UIImage *)image
style:(CSToastStyle *)style style:(CSToastStyle *)style
......
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