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
24d62d31
Commit
24d62d31
authored
Dec 08, 2018
by
Karthik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged PR #32
parent
e457a4f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
2 deletions
+100
-2
CHANGELOG.md
+4
-0
README.md
+1
-1
lib/generated/i18n.dart
+94
-0
pubspec.yaml
+1
-1
No files found.
CHANGELOG.md
View file @
24d62d31
## [2.1.3]
*
Merged PR #32
## [2.1.2]
## [2.1.2]
*
iOS Color Fix
*
iOS Color Fix
...
...
README.md
View file @
24d62d31
...
@@ -11,7 +11,7 @@ Android Toast Library for Flutter
...
@@ -11,7 +11,7 @@ Android Toast Library for Flutter
```
yaml
```
yaml
# add this line to your dependencies
# add this line to your dependencies
fluttertoast
:
^2.1.
2
fluttertoast
:
^2.1.
3
```
```
```
dart
```
dart
...
...
lib/generated/i18n.dart
0 → 100644
View file @
24d62d31
import
'dart:async'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: camel_case_types
// ignore_for_file: prefer_single_quotes
//This file is automatically generated. DO NOT EDIT, all your changes would be lost.
class
S
implements
WidgetsLocalizations
{
const
S
();
static
const
GeneratedLocalizationsDelegate
delegate
=
GeneratedLocalizationsDelegate
();
static
S
of
(
BuildContext
context
)
=>
Localizations
.
of
<
S
>(
context
,
S
);
@override
TextDirection
get
textDirection
=>
TextDirection
.
ltr
;
}
class
en
extends
S
{
const
en
();
}
class
GeneratedLocalizationsDelegate
extends
LocalizationsDelegate
<
S
>
{
const
GeneratedLocalizationsDelegate
();
List
<
Locale
>
get
supportedLocales
{
return
const
<
Locale
>[
Locale
(
"en"
,
""
),
];
}
LocaleListResolutionCallback
listResolution
({
Locale
fallback
})
{
return
(
List
<
Locale
>
locales
,
Iterable
<
Locale
>
supported
)
{
if
(
locales
==
null
||
locales
.
isEmpty
)
{
return
fallback
??
supported
.
first
;
}
else
{
return
_resolve
(
locales
.
first
,
fallback
,
supported
);
}
};
}
LocaleResolutionCallback
resolution
({
Locale
fallback
})
{
return
(
Locale
locale
,
Iterable
<
Locale
>
supported
)
{
return
_resolve
(
locale
,
fallback
,
supported
);
};
}
Locale
_resolve
(
Locale
locale
,
Locale
fallback
,
Iterable
<
Locale
>
supported
)
{
if
(
locale
==
null
||
!
isSupported
(
locale
))
{
return
fallback
??
supported
.
first
;
}
final
Locale
languageLocale
=
Locale
(
locale
.
languageCode
,
""
);
if
(
supported
.
contains
(
locale
))
{
return
locale
;
}
else
if
(
supported
.
contains
(
languageLocale
))
{
return
languageLocale
;
}
else
{
final
Locale
fallbackLocale
=
fallback
??
supported
.
first
;
return
fallbackLocale
;
}
}
@override
Future
<
S
>
load
(
Locale
locale
)
{
final
String
lang
=
getLang
(
locale
);
if
(
lang
!=
null
)
{
switch
(
lang
)
{
case
"en"
:
return
SynchronousFuture
<
S
>(
const
en
());
default
:
// NO-OP.
}
}
return
SynchronousFuture
<
S
>(
const
S
());
}
@override
bool
isSupported
(
Locale
locale
)
=>
locale
!=
null
&&
supportedLocales
.
contains
(
locale
);
@override
bool
shouldReload
(
GeneratedLocalizationsDelegate
old
)
=>
false
;
}
String
getLang
(
Locale
l
)
=>
l
==
null
?
null
:
l
.
countryCode
!=
null
&&
l
.
countryCode
.
isEmpty
?
l
.
languageCode
:
l
.
toString
();
pubspec.yaml
View file @
24d62d31
name
:
fluttertoast
name
:
fluttertoast
description
:
Toast Library for FLutter
description
:
Toast Library for FLutter
version
:
2.1.
2
version
:
2.1.
3
author
:
Karthik Ponnam <ponnamkarthik3@gmail.com>
author
:
Karthik Ponnam <ponnamkarthik3@gmail.com>
homepage
:
https://github.com/PonnamKarthik/FlutterToast
homepage
:
https://github.com/PonnamKarthik/FlutterToast
...
...
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