Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
font_awesome_flutter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
font_awesome_flutter
Commits
46a0ba72
Commit
46a0ba72
authored
Jun 24, 2017
by
Brian Egan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the example to support back button actions more appropriately on Android
parent
dca29b23
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
main.dart
example/lib/main.dart
+23
-9
No files found.
example/lib/main.dart
View file @
46a0ba72
...
@@ -35,26 +35,40 @@ class FontAwesomeGalleryHomeState extends State<FontAwesomeGalleryHome> {
...
@@ -35,26 +35,40 @@ class FontAwesomeGalleryHomeState extends State<FontAwesomeGalleryHome> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
return
new
Scaffold
(
appBar:
new
AppBar
(
appBar:
new
AppBar
(
leading:
isSearching
?
new
IconButton
(
icon:
new
Icon
(
FontAwesomeIcons
.
arrowLeft
),
onPressed:
()
=>
setState
(()
{
isSearching
=
false
;
searchTerm
=
""
;
}))
:
null
,
title:
isSearching
title:
isSearching
?
new
TextField
(
?
new
TextField
(
onChanged:
(
text
)
=>
setState
(()
=>
searchTerm
=
text
),
onChanged:
(
text
)
=>
setState
(()
=>
searchTerm
=
text
),
autofocus:
true
,
autofocus:
true
,
style:
new
TextStyle
(
fontSize:
18.0
),
style:
new
TextStyle
(
fontSize:
18.0
),
decoration:
new
InputDecoration
(
hideDivider:
true
),
)
)
:
new
Text
(
"Font Awesome Flutter Gallery"
),
:
new
Text
(
"Font Awesome Flutter Gallery"
),
actions:
isSearching
actions:
isSearching
?
[
?
null
new
IconButton
(
icon:
new
Icon
(
FontAwesomeIcons
.
timesCircle
),
onPressed:
()
=>
setState
(()
{
isSearching
=
false
;
searchTerm
=
""
;
}))
]
:
[
:
[
new
IconButton
(
new
IconButton
(
icon:
new
Icon
(
FontAwesomeIcons
.
search
),
icon:
new
Icon
(
FontAwesomeIcons
.
search
),
onPressed:
()
=>
setState
(()
=>
isSearching
=
true
))
onPressed:
()
{
ModalRoute
.
of
(
context
).
addLocalHistoryEntry
(
new
LocalHistoryEntry
(
onRemove:
()
{
setState
(()
{
searchTerm
=
""
;
isSearching
=
false
;
});
}));
setState
(()
{
isSearching
=
true
;
});
})
],
],
),
),
body:
new
GridView
.
count
(
body:
new
GridView
.
count
(
...
...
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