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
a05909e3
Commit
a05909e3
authored
Apr 01, 2016
by
Ian Hickson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #3049 from Hixie/gallery
Tweak the typography demo to match the spec more
parent
ca4b5cf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
typography_demo.dart
examples/material_gallery/lib/demo/typography_demo.dart
+13
-13
No files found.
examples/material_gallery/lib/demo/typography_demo.dart
View file @
a05909e3
...
...
@@ -19,7 +19,7 @@ class TextStyleItem extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
nameStyle
=
theme
.
textTheme
.
body1
.
copyWith
(
color:
theme
.
textTheme
.
caption
.
color
);
final
TextStyle
nameStyle
=
theme
.
textTheme
.
caption
.
copyWith
(
color:
theme
.
textTheme
.
caption
.
color
);
return
new
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8.0
,
vertical:
16.0
),
child:
new
Row
(
...
...
@@ -30,7 +30,7 @@ class TextStyleItem extends StatelessWidget {
child:
new
Text
(
name
,
style:
nameStyle
)
),
new
Flexible
(
child:
new
Text
(
text
,
style:
style
)
child:
new
Text
(
text
,
style:
style
.
copyWith
(
height:
1.0
)
)
)
]
)
...
...
@@ -43,21 +43,21 @@ class TypographyDemo extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
final
TextTheme
textTheme
=
Theme
.
of
(
context
).
textTheme
;
final
List
<
Widget
>
styleItems
=
<
Widget
>[
new
TextStyleItem
(
name:
'
display
3'
,
style:
textTheme
.
display3
,
text:
'Regular 56sp'
),
new
TextStyleItem
(
name:
'
display
2'
,
style:
textTheme
.
display2
,
text:
'Regular 45sp'
),
new
TextStyleItem
(
name:
'
display
1'
,
style:
textTheme
.
display1
,
text:
'Regular 34sp'
),
new
TextStyleItem
(
name:
'
h
eadline'
,
style:
textTheme
.
headline
,
text:
'Regular 24sp'
),
new
TextStyleItem
(
name:
'
t
itle'
,
style:
textTheme
.
title
,
text:
'Medium 20sp'
),
new
TextStyleItem
(
name:
'
subhead
'
,
style:
textTheme
.
subhead
,
text:
'Regular 16sp'
),
new
TextStyleItem
(
name:
'
body
2'
,
style:
textTheme
.
body2
,
text:
'Medium 14sp'
),
new
TextStyleItem
(
name:
'
body
1'
,
style:
textTheme
.
body1
,
text:
'Reguluar 14sp'
),
new
TextStyleItem
(
name:
'
c
aption'
,
style:
textTheme
.
caption
,
text:
'Regular 12sp'
),
new
TextStyleItem
(
name:
'
b
utton'
,
style:
textTheme
.
button
,
text:
'MEDIUM (ALL CAPS) 14sp'
)
new
TextStyleItem
(
name:
'
Display
3'
,
style:
textTheme
.
display3
,
text:
'Regular 56sp'
),
new
TextStyleItem
(
name:
'
Display
2'
,
style:
textTheme
.
display2
,
text:
'Regular 45sp'
),
new
TextStyleItem
(
name:
'
Display
1'
,
style:
textTheme
.
display1
,
text:
'Regular 34sp'
),
new
TextStyleItem
(
name:
'
H
eadline'
,
style:
textTheme
.
headline
,
text:
'Regular 24sp'
),
new
TextStyleItem
(
name:
'
T
itle'
,
style:
textTheme
.
title
,
text:
'Medium 20sp'
),
new
TextStyleItem
(
name:
'
Subheading
'
,
style:
textTheme
.
subhead
,
text:
'Regular 16sp'
),
new
TextStyleItem
(
name:
'
Body
2'
,
style:
textTheme
.
body2
,
text:
'Medium 14sp'
),
new
TextStyleItem
(
name:
'
Body
1'
,
style:
textTheme
.
body1
,
text:
'Reguluar 14sp'
),
new
TextStyleItem
(
name:
'
C
aption'
,
style:
textTheme
.
caption
,
text:
'Regular 12sp'
),
new
TextStyleItem
(
name:
'
B
utton'
,
style:
textTheme
.
button
,
text:
'MEDIUM (ALL CAPS) 14sp'
)
];
if
(
MediaQuery
.
of
(
context
).
size
.
width
>
500.0
)
{
styleItems
.
insert
(
0
,
new
TextStyleItem
(
name:
'
display
4'
,
name:
'
Display
4'
,
style:
textTheme
.
display4
,
text:
'Light 112sp'
));
...
...
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