Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d6a60536
Commit
d6a60536
authored
Sep 01, 2016
by
Hans Muller
Committed by
GitHub
Sep 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contacts icon alignment (#5719)
parent
8fed9d9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
contacts_demo.dart
examples/flutter_gallery/lib/demo/contacts_demo.dart
+14
-6
No files found.
examples/flutter_gallery/lib/demo/contacts_demo.dart
View file @
d6a60536
...
...
@@ -12,18 +12,21 @@ class _ContactCategory extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
final
ThemeData
themeData
=
Theme
.
of
(
context
);
return
new
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
16.0
),
decoration:
new
BoxDecoration
(
border:
new
Border
(
bottom:
new
BorderSide
(
color:
Theme
.
of
(
context
)
.
dividerColor
))
border:
new
Border
(
bottom:
new
BorderSide
(
color:
themeData
.
dividerColor
))
),
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
textTheme
.
subhead
,
child:
new
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
new
SizedBox
(
new
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
24.0
),
width:
72.0
,
child:
new
Icon
(
icon
,
color:
Theme
.
of
(
context
)
.
primaryColor
)
child:
new
Icon
(
icon
,
color:
themeData
.
primaryColor
)
),
new
Flexible
(
child:
new
Column
(
children:
children
))
]
...
...
@@ -45,8 +48,9 @@ class _ContactItem extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
final
ThemeData
themeData
=
Theme
.
of
(
context
);
List
<
Widget
>
columnChildren
=
lines
.
sublist
(
0
,
lines
.
length
-
1
).
map
((
String
line
)
=>
new
Text
(
line
)).
toList
();
columnChildren
.
add
(
new
Text
(
lines
.
last
,
style:
Theme
.
of
(
context
)
.
textTheme
.
caption
));
columnChildren
.
add
(
new
Text
(
lines
.
last
,
style:
themeData
.
textTheme
.
caption
));
List
<
Widget
>
rowChildren
=
<
Widget
>[
new
Flexible
(
...
...
@@ -59,7 +63,11 @@ class _ContactItem extends StatelessWidget {
if
(
icon
!=
null
)
{
rowChildren
.
add
(
new
SizedBox
(
width:
72.0
,
child:
new
IconButton
(
icon:
new
Icon
(
icon
),
onPressed:
onPressed
)
child:
new
IconButton
(
icon:
new
Icon
(
icon
),
color:
themeData
.
primaryColor
,
onPressed:
onPressed
)
));
}
return
new
Padding
(
...
...
@@ -200,7 +208,7 @@ class ContactsDemoState extends State<ContactsDemo> {
]
),
new
_ContactCategory
(
icon:
Icons
.
e
mail
,
icon:
Icons
.
contact_
mail
,
children:
<
Widget
>[
new
_ContactItem
(
icon:
Icons
.
email
,
...
...
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