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
5c1dd53e
Commit
5c1dd53e
authored
Feb 20, 2023
by
Karthik Ponnam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed
parent
9b92427b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
81 deletions
+67
-81
CHANGELOG.md
+4
-0
README.md
+1
-1
example/pubspec.lock
+33
-52
lib/fluttertoast.dart
+17
-10
pubspec.lock
+11
-17
pubspec.yaml
+1
-1
No files found.
CHANGELOG.md
View file @
5c1dd53e
## [8.2.1]
-
Removed
`context.mounted`
## [8.2.0]
## [8.2.0]
-
Updated the flow for Toast with Context
-
Updated the flow for Toast with Context
...
...
README.md
View file @
5c1dd53e
...
@@ -34,7 +34,7 @@ This one has limited features and no control over UI
...
@@ -34,7 +34,7 @@ This one has limited features and no control over UI
```
yaml
```
yaml
# add this line to your dependencies
# add this line to your dependencies
fluttertoast
:
^8.2.
0
fluttertoast
:
^8.2.
1
```
```
```
dart
```
dart
...
...
example/pubspec.lock
View file @
5c1dd53e
...
@@ -5,56 +5,49 @@ packages:
...
@@ -5,56 +5,49 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: async
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.
10
.0"
version: "2.
9
.0"
boolean_selector:
boolean_selector:
dependency: transitive
dependency: transitive
description:
description:
name: boolean_selector
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.1.
1
"
version: "2.1.
0
"
characters:
characters:
dependency: transitive
dependency: transitive
description:
description:
name: characters
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.2.1"
version: "1.2.1"
clock:
clock:
dependency: transitive
dependency: transitive
description:
description:
name: clock
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.1.1"
version: "1.1.1"
collection:
collection:
dependency: transitive
dependency: transitive
description:
description:
name: collection
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.1
7
.0"
version: "1.1
6
.0"
cupertino_icons:
cupertino_icons:
dependency: "direct main"
dependency: "direct main"
description:
description:
name: cupertino_icons
name: cupertino_icons
sha256: a937da4c006989739ceb4d10e3bd6cce64ca85d0fe287fc5b2b9f6ee757dcee6
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.1.3"
version: "0.1.3"
fake_async:
fake_async:
dependency: transitive
dependency: transitive
description:
description:
name: fake_async
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.3.1"
version: "1.3.1"
flutter:
flutter:
...
@@ -78,45 +71,40 @@ packages:
...
@@ -78,45 +71,40 @@ packages:
path: ".."
path: ".."
relative: true
relative: true
source: path
source: path
version: "8.2.
0
"
version: "8.2.
1
"
js:
js:
dependency: transitive
dependency: transitive
description:
description:
name: js
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.6.
5
"
version: "0.6.
4
"
matcher:
matcher:
dependency: transitive
dependency: transitive
description:
description:
name: matcher
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.12.1
3
"
version: "0.12.1
2
"
material_color_utilities:
material_color_utilities:
dependency: transitive
dependency: transitive
description:
description:
name: material_color_utilities
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.
2.0
"
version: "0.
1.5
"
meta:
meta:
dependency: transitive
dependency: transitive
description:
description:
name: meta
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.8.0"
version: "1.8.0"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
name: path
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.8.2"
version: "1.8.2"
sky_engine:
sky_engine:
...
@@ -128,58 +116,51 @@ packages:
...
@@ -128,58 +116,51 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: source_span
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.9.
1
"
version: "1.9.
0
"
stack_trace:
stack_trace:
dependency: transitive
dependency: transitive
description:
description:
name: stack_trace
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.1
1
.0"
version: "1.1
0
.0"
stream_channel:
stream_channel:
dependency: transitive
dependency: transitive
description:
description:
name: stream_channel
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.1.
1
"
version: "2.1.
0
"
string_scanner:
string_scanner:
dependency: transitive
dependency: transitive
description:
description:
name: string_scanner
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.
2.0
"
version: "1.
1.1
"
term_glyph:
term_glyph:
dependency: transitive
dependency: transitive
description:
description:
name: term_glyph
name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.2.1"
version: "1.2.1"
test_api:
test_api:
dependency: transitive
dependency: transitive
description:
description:
name: test_api
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.4.1
6
"
version: "0.4.1
2
"
vector_math:
vector_math:
dependency: transitive
dependency: transitive
description:
description:
name: vector_math
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.1.
4
"
version: "2.1.
2
"
sdks:
sdks:
dart: ">=2.1
8.
0 <3.0.0"
dart: ">=2.1
7.0-
0 <3.0.0"
flutter: ">=1.10.0"
flutter: ">=1.10.0"
lib/fluttertoast.dart
View file @
5c1dd53e
...
@@ -151,16 +151,17 @@ class FToast {
...
@@ -151,16 +151,17 @@ class FToast {
/// To prevent exception "Looking up a deactivated widget's ancestor is unsafe."
/// To prevent exception "Looking up a deactivated widget's ancestor is unsafe."
/// which can be thrown if context was unmounted (e.g. screen with given context was popped)
/// which can be thrown if context was unmounted (e.g. screen with given context was popped)
if
(
context
?.
mounted
!=
true
)
{
/// TODO: revert this change when envoirment will be Flutter >= 3.7.0
if
(
kDebugMode
)
{
// if (context?.mounted != true) {
print
(
// if (kDebugMode) {
'FToast: Context was unmuted, can not show
${_overlayQueue.length}
toast.'
);
// print(
}
// 'FToast: Context was unmuted, can not show ${_overlayQueue.length} toast.');
// }
/// Need to clear queue
removeQueuedCustomToasts
();
// /// Need to clear queue
return
;
// Or maybe thrown error too
// removeQueuedCustomToasts();
}
// return; // Or maybe thrown error too
// }
var
_overlay
;
var
_overlay
;
try
{
try
{
_overlay
=
Overlay
.
of
(
context
!);
_overlay
=
Overlay
.
of
(
context
!);
...
@@ -295,6 +296,8 @@ class FToast {
...
@@ -295,6 +296,8 @@ class FToast {
}
}
}
}
/// Simple builder method to create a [TransitionBuilder]
/// and for the use in MaterialApp builder method
// ignore: non_constant_identifier_names
// ignore: non_constant_identifier_names
TransitionBuilder
FToastBuilder
(
)
{
TransitionBuilder
FToastBuilder
(
)
{
return
(
context
,
child
)
{
return
(
context
,
child
)
{
...
@@ -304,6 +307,10 @@ TransitionBuilder FToastBuilder() {
...
@@ -304,6 +307,10 @@ TransitionBuilder FToastBuilder() {
};
};
}
}
/// Simple StatelessWidget which holds the child
/// and creates an [Overlay] to display the toast
/// which returns the Directionality widget with [TextDirection.ltr]
/// and [Overlay] widget
class
_FToastHolder
extends
StatelessWidget
{
class
_FToastHolder
extends
StatelessWidget
{
const
_FToastHolder
({
Key
?
key
,
required
this
.
child
})
:
super
(
key:
key
);
const
_FToastHolder
({
Key
?
key
,
required
this
.
child
})
:
super
(
key:
key
);
...
...
pubspec.lock
View file @
5c1dd53e
...
@@ -5,18 +5,16 @@ packages:
...
@@ -5,18 +5,16 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: characters
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.2.1"
version: "1.2.1"
collection:
collection:
dependency: transitive
dependency: transitive
description:
description:
name: collection
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.1
7
.0"
version: "1.1
6
.0"
flutter:
flutter:
dependency: "direct main"
dependency: "direct main"
description: flutter
description: flutter
...
@@ -31,24 +29,21 @@ packages:
...
@@ -31,24 +29,21 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: js
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.6.
5
"
version: "0.6.
4
"
material_color_utilities:
material_color_utilities:
dependency: transitive
dependency: transitive
description:
description:
name: material_color_utilities
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.
2.0
"
version: "0.
1.5
"
meta:
meta:
dependency: transitive
dependency: transitive
description:
description:
name: meta
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.8.0"
version: "1.8.0"
sky_engine:
sky_engine:
...
@@ -60,10 +55,9 @@ packages:
...
@@ -60,10 +55,9 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: vector_math
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.1.
4
"
version: "2.1.
2
"
sdks:
sdks:
dart: ">=2.17.0-0 <
4
.0.0"
dart: ">=2.17.0-0 <
3
.0.0"
flutter: ">=1.10.0"
flutter: ">=1.10.0"
pubspec.yaml
View file @
5c1dd53e
name
:
fluttertoast
name
:
fluttertoast
description
:
Toast Library for Flutter, Easily create toast messages in single line of code
description
:
Toast Library for Flutter, Easily create toast messages in single line of code
version
:
8.2.
0
version
:
8.2.
1
homepage
:
https://github.com/PonnamKarthik/FlutterToast
homepage
:
https://github.com/PonnamKarthik/FlutterToast
issue_tracker
:
https://github.com/ponnamkarthik/FlutterToast/issues
issue_tracker
:
https://github.com/ponnamkarthik/FlutterToast/issues
...
...
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