Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fluttertoast
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
fluttertoast
Commits
a9b19344
Commit
a9b19344
authored
Jan 18, 2019
by
Zac Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fxied more issues
parent
1732e9dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletions
+24
-1
ios/Classes/FluttertoastPlugin.m
+2
-1
ios/Classes/UIView+Toast.h
+22
-0
No files found.
ios/Classes/FluttertoastPlugin.m
View file @
a9b19344
...
@@ -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
:@{
@"didTa
o"
:
didTap
@"didTa
p"
:
boolNumber
}];
}];
...
...
ios/Classes/UIView+Toast.h
View file @
a9b19344
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment