Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jonny Borges
2020-05-10 12:38:52 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2020-05-10 12:38:52 -0300
Commit
feb4a634dbb30d95d2fbb0432ebf8106822384da
feb4a634
1 parent
0ebb9f78
Add files via upload
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
24 deletions
CHANGELOG.md
lib/src/get_main.dart
pubspec.yaml
CHANGELOG.md
View file @
feb4a63
## [2.2.6]
-
Fix cancel button on defaultDialog don't appear when widget implementation usage
## [2.2.5]
-
Refator defaultDialog
## [2.2.4]
-
Clean code
-
Fix Get.LazyPut
## [2.2.3]
-
Remove defaultDialog type
## [2.2.2]
-
Fix GetRoute not found
...
...
lib/src/get_main.dart
View file @
feb4a63
...
...
@@ -251,26 +251,36 @@ class Get {
double
radius
=
20.0
,
List
<
Widget
>
actions
,
})
{
Widget
cancelButton
=
cancel
??
(
onCancel
!=
null
||
textCancel
!=
null
)
?
FlatButton
(
bool
leanCancel
=
onCancel
!=
null
||
textCancel
!=
null
;
bool
leanConfirm
=
onConfirm
!=
null
||
textConfirm
!=
null
;
actions
??=
[];
if
(
cancel
!=
null
)
{
actions
.
add
(
cancel
);
}
else
{
if
(
leanCancel
)
{
actions
.
add
(
FlatButton
(
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
onPressed:
()
{
onCancel
?.
call
();
Get
.
back
();
},
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
8
),
child:
Text
(
textConfirm
??
"Cancel"
),
child:
Text
(
textCancel
??
"Cancel"
),
shape:
RoundedRectangleBorder
(
side:
BorderSide
(
color:
buttonColor
??
Get
.
theme
.
accentColor
,
width:
2
,
style:
BorderStyle
.
solid
),
borderRadius:
BorderRadius
.
circular
(
100
)),
)
:
null
;
Widget
confirmButton
=
confirm
??
(
onConfirm
!=
null
||
textConfirm
!=
null
)
?
FlatButton
(
));
}
}
if
(
confirm
!=
null
)
{
actions
.
add
(
confirm
);
}
else
{
if
(
leanConfirm
)
{
actions
.
add
(
FlatButton
(
materialTapTargetSize:
MaterialTapTargetSize
.
shrinkWrap
,
color:
buttonColor
??
Get
.
theme
.
accentColor
,
shape:
RoundedRectangleBorder
(
...
...
@@ -278,15 +288,7 @@ class Get {
child:
Text
(
textConfirm
??
"Ok"
),
onPressed:
()
{
onConfirm
?.
call
();
})
:
null
;
if
(
actions
==
null
)
{
actions
=
[];
if
(
cancelButton
!=
null
)
{
actions
.
add
(
cancelButton
);
}
if
(
confirmButton
!=
null
)
{
actions
.
add
(
confirmButton
);
}));
}
}
return
Get
.
dialog
(
AlertDialog
(
...
...
@@ -596,12 +598,7 @@ class Get {
Map
<
dynamic
,
_FcBuilderFunc
>
_factory
=
{};
static
void
lazyPut
<
S
>(
Object
instance
)
{
final
lazy
=
()
=>
instance
;
Get
().
_factory
.
putIfAbsent
(
S
,
()
=>
lazy
);
}
static
void
lazyPutBuilder
<
S
>(
_FcBuilderFunc
function
)
{
static
void
lazyPut
<
S
>(
_FcBuilderFunc
function
)
{
Get
().
_factory
.
putIfAbsent
(
S
,
()
=>
function
);
}
...
...
pubspec.yaml
View file @
feb4a63
name
:
get
description
:
Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
version
:
2.2.
2
version
:
2.2.
6
homepage
:
https://github.com/jonataslaw/get
environment
:
...
...
Please
register
or
login
to post a comment