Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_native_toast
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
flutter-plugin
flutter_native_toast
Commits
9b4fec6b
Commit
9b4fec6b
authored
Oct 15, 2021
by
汪林玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级到null-safety
parent
0a01c1d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
lib/flutter_native_toast.dart
lib/flutter_native_toast.dart
+3
-7
pubspec.yaml
pubspec.yaml
+1
-1
No files found.
lib/flutter_native_toast.dart
View file @
9b4fec6b
import
'package:flutter/services.dart'
;
class
FlutterNativeToast
{
static
const
MethodChannel
_channel
=
const
MethodChannel
(
'flutter_native_toast'
);
static
const
MethodChannel
_channel
=
const
MethodChannel
(
'flutter_native_toast'
);
static
showToast
(
String
msg
,
{
ToastDuration
duration
=
ToastDuration
.
LENGTH_SHORT
,
ToastPosition
position
=
ToastPosition
.
center
})
{
_channel
.
invokeMethod
(
'showToast'
,
{
"msg"
:
msg
,
"duration"
:
duration
.
index
,
"position"
:
position
.
index
});
static
showToast
(
String
msg
,{
ToastDuration
duration
=
ToastDuration
.
LENGTH_SHORT
,
ToastPosition
position
=
ToastPosition
.
center
})
{
_channel
.
invokeMethod
(
'showToast'
,{
"msg"
:
msg
,
"duration"
:
duration
.
index
,
"position"
:
position
.
index
});
}
}
...
...
pubspec.yaml
View file @
9b4fec6b
...
...
@@ -4,7 +4,7 @@ version: 1.0.0
homepage
:
environment
:
sdk
:
"
>=2.7.0
<3.0.0"
sdk
:
'
>=2.12.0
<3.0.0'
flutter
:
"
>=1.10.0"
dependencies
:
...
...
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