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
7ba19605
Commit
7ba19605
authored
Mar 12, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[rename fixit] ThemeData#text -> textTheme
Fixes #1278
parent
b5923f92
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
80 additions
and
80 deletions
+80
-80
drag_and_drop.dart
dev/manual_tests/drag_and_drop.dart
+2
-2
buttons_demo.dart
examples/material_gallery/lib/demo/buttons_demo.dart
+1
-1
cards_demo.dart
examples/material_gallery/lib/demo/cards_demo.dart
+3
-3
dialog_demo.dart
examples/material_gallery/lib/demo/dialog_demo.dart
+1
-1
fitness_demo.dart
examples/material_gallery/lib/demo/fitness_demo.dart
+1
-1
flexible_space_demo.dart
examples/material_gallery/lib/demo/flexible_space_demo.dart
+2
-2
full_screen_dialog_demo.dart
...es/material_gallery/lib/demo/full_screen_dialog_demo.dart
+7
-7
icons_demo.dart
examples/material_gallery/lib/demo/icons_demo.dart
+1
-1
progress_indicator_demo.dart
...es/material_gallery/lib/demo/progress_indicator_demo.dart
+1
-1
scrolling_techniques_demo.dart
.../material_gallery/lib/demo/scrolling_techniques_demo.dart
+2
-2
tabs_fab_demo.dart
examples/material_gallery/lib/demo/tabs_fab_demo.dart
+1
-1
tooltip_demo.dart
examples/material_gallery/lib/demo/tooltip_demo.dart
+3
-3
typography_demo.dart
examples/material_gallery/lib/demo/typography_demo.dart
+2
-2
section.dart
examples/material_gallery/lib/gallery/section.dart
+1
-1
stock_symbol_viewer.dart
examples/stocks/lib/stock_symbol_viewer.dart
+2
-2
button.dart
packages/flutter/lib/src/material/button.dart
+1
-1
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+2
-2
dialog.dart
packages/flutter/lib/src/material/dialog.dart
+2
-2
drawer_header.dart
packages/flutter/lib/src/material/drawer_header.dart
+1
-1
drawer_item.dart
packages/flutter/lib/src/material/drawer_item.dart
+1
-1
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+1
-1
input.dart
packages/flutter/lib/src/material/input.dart
+6
-6
list_item.dart
packages/flutter/lib/src/material/list_item.dart
+3
-3
material.dart
packages/flutter/lib/src/material/material.dart
+1
-1
popup_menu.dart
packages/flutter/lib/src/material/popup_menu.dart
+1
-1
snack_bar.dart
packages/flutter/lib/src/material/snack_bar.dart
+1
-1
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+9
-9
tooltip.dart
packages/flutter/lib/src/material/tooltip.dart
+1
-1
two_level_list.dart
packages/flutter/lib/src/material/two_level_list.dart
+2
-2
markdown_style.dart
packages/flutter_markdown/lib/src/markdown_style.dart
+18
-18
No files found.
dev/manual_tests/drag_and_drop.dart
View file @
7ba19605
...
...
@@ -90,7 +90,7 @@ class ExampleDragSource extends StatelessComponent {
size
*=
kHeavyMultiplier
;
Widget
contents
=
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
body1
.
copyWith
(
textAlign:
TextAlign
.
center
),
style:
Theme
.
of
(
context
).
text
Theme
.
body1
.
copyWith
(
textAlign:
TextAlign
.
center
),
child:
new
Dot
(
color:
color
,
size:
size
,
...
...
@@ -174,7 +174,7 @@ class MovableBall extends StatelessComponent {
Widget
build
(
BuildContext
context
)
{
Widget
ball
=
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
body1
.
copyWith
(
style:
Theme
.
of
(
context
).
text
Theme
.
body1
.
copyWith
(
textAlign:
TextAlign
.
center
,
color:
Colors
.
white
),
...
...
examples/material_gallery/lib/demo/buttons_demo.dart
View file @
7ba19605
...
...
@@ -177,7 +177,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
Widget
buildTabView
(
_ButtonDemo
demo
)
{
return
new
Builder
(
builder:
(
BuildContext
context
)
{
final
TextStyle
textStyle
=
Theme
.
of
(
context
).
text
.
caption
.
copyWith
(
fontSize:
16.0
);
final
TextStyle
textStyle
=
Theme
.
of
(
context
).
text
Theme
.
caption
.
copyWith
(
fontSize:
16.0
);
return
new
Column
(
alignItems:
FlexAlignItems
.
stretch
,
children:
<
Widget
>[
...
...
examples/material_gallery/lib/demo/cards_demo.dart
View file @
7ba19605
...
...
@@ -45,9 +45,9 @@ class TravelDestinationItem extends StatelessComponent {
Widget
build
(
BuildContext
context
)
{
ThemeData
theme
=
Theme
.
of
(
context
);
TextStyle
titleStyle
=
theme
.
text
.
headline
.
copyWith
(
color:
Colors
.
white
);
TextStyle
descriptionStyle
=
theme
.
text
.
subhead
;
TextStyle
buttonStyle
=
theme
.
text
.
button
.
copyWith
(
color:
theme
.
primaryColor
);
TextStyle
titleStyle
=
theme
.
text
Theme
.
headline
.
copyWith
(
color:
Colors
.
white
);
TextStyle
descriptionStyle
=
theme
.
text
Theme
.
subhead
;
TextStyle
buttonStyle
=
theme
.
text
Theme
.
button
.
copyWith
(
color:
theme
.
primaryColor
);
return
new
Card
(
child:
new
SizedBox
(
...
...
examples/material_gallery/lib/demo/dialog_demo.dart
View file @
7ba19605
...
...
@@ -76,7 +76,7 @@ class DialogDemoState extends State<DialogDemo> {
Widget
build
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
dialogTextStyle
=
theme
.
text
.
subhead
.
copyWith
(
color:
theme
.
text
.
caption
.
color
);
final
TextStyle
dialogTextStyle
=
theme
.
text
Theme
.
subhead
.
copyWith
(
color:
theme
.
textTheme
.
caption
.
color
);
return
new
Scaffold
(
key:
scaffoldKey
,
...
...
examples/material_gallery/lib/demo/fitness_demo.dart
View file @
7ba19605
...
...
@@ -103,7 +103,7 @@ class _FitnessDemoContentsState extends State<_FitnessDemoContents> {
),
new
Padding
(
padding:
new
EdgeDims
.
only
(
top:
20.0
),
child:
new
Text
(
"JUMPING JACKS"
,
style:
Theme
.
of
(
context
).
text
.
title
)
child:
new
Text
(
"JUMPING JACKS"
,
style:
Theme
.
of
(
context
).
text
Theme
.
title
)
),
new
Padding
(
padding:
new
EdgeDims
.
only
(
top:
20.0
,
bottom:
20.0
),
...
...
examples/material_gallery/lib/demo/flexible_space_demo.dart
View file @
7ba19605
...
...
@@ -18,7 +18,7 @@ class _ContactCategory extends StatelessComponent {
border:
new
Border
(
bottom:
new
BorderSide
(
color:
Theme
.
of
(
context
).
dividerColor
))
),
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
subhead
,
style:
Theme
.
of
(
context
).
text
Theme
.
subhead
,
child:
new
Row
(
children:
<
Widget
>[
new
SizedBox
(
...
...
@@ -43,7 +43,7 @@ class _ContactItem extends StatelessComponent {
Widget
build
(
BuildContext
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
).
text
.
caption
));
columnChildren
.
add
(
new
Text
(
lines
.
last
,
style:
Theme
.
of
(
context
).
text
Theme
.
caption
));
List
<
Widget
>
rowChildren
=
<
Widget
>[
new
Column
(
...
...
examples/material_gallery/lib/demo/full_screen_dialog_demo.dart
View file @
7ba19605
...
...
@@ -31,7 +31,7 @@ class DateTimeItem extends StatelessComponent {
final
ThemeData
theme
=
Theme
.
of
(
context
);
return
new
DefaultTextStyle
(
style:
theme
.
text
.
subhead
,
style:
theme
.
text
Theme
.
subhead
,
child:
new
Row
(
children:
<
Widget
>[
new
Flexible
(
...
...
@@ -109,7 +109,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
}
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
dialogTextStyle
=
theme
.
text
.
subhead
.
copyWith
(
color:
theme
.
text
.
caption
.
color
);
final
TextStyle
dialogTextStyle
=
theme
.
text
Theme
.
subhead
.
copyWith
(
color:
theme
.
textTheme
.
caption
.
color
);
showDialog
(
context:
context
,
...
...
@@ -149,7 +149,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
center:
new
Text
(
'New Event'
),
right:
<
Widget
>
[
new
FlatButton
(
child:
new
Text
(
'SAVE'
,
style:
theme
.
text
.
body1
.
copyWith
(
color:
Colors
.
white
)),
child:
new
Text
(
'SAVE'
,
style:
theme
.
text
Theme
.
body1
.
copyWith
(
color:
Colors
.
white
)),
onPressed:
()
{
Navigator
.
pop
(
context
,
DismissDialogAction
.
save
);
}
...
...
@@ -170,7 +170,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
),
child:
new
Align
(
alignment:
const
FractionalOffset
(
0.0
,
1.0
),
child:
new
Text
(
'Event name'
,
style:
theme
.
text
.
display2
)
child:
new
Text
(
'Event name'
,
style:
theme
.
text
Theme
.
display2
)
)
),
new
Container
(
...
...
@@ -180,14 +180,14 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
),
child:
new
Align
(
alignment:
const
FractionalOffset
(
0.0
,
1.0
),
child:
new
Text
(
'Location'
,
style:
theme
.
text
.
title
.
copyWith
(
color:
Colors
.
black54
))
child:
new
Text
(
'Location'
,
style:
theme
.
text
Theme
.
title
.
copyWith
(
color:
Colors
.
black54
))
)
),
new
Column
(
alignItems:
FlexAlignItems
.
stretch
,
justifyContent:
FlexJustifyContent
.
end
,
children:
<
Widget
>[
new
Text
(
'From'
,
style:
theme
.
text
.
caption
),
new
Text
(
'From'
,
style:
theme
.
text
Theme
.
caption
),
new
DateTimeItem
(
dateTime:
fromDateTime
,
onChanged:
(
DateTime
value
)
{
...
...
@@ -203,7 +203,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
alignItems:
FlexAlignItems
.
stretch
,
justifyContent:
FlexJustifyContent
.
end
,
children:
<
Widget
>[
new
Text
(
'To'
,
style:
theme
.
text
.
caption
),
new
Text
(
'To'
,
style:
theme
.
text
Theme
.
caption
),
new
DateTimeItem
(
dateTime:
toDateTime
,
onChanged:
(
DateTime
value
)
{
...
...
examples/material_gallery/lib/demo/icons_demo.dart
View file @
7ba19605
...
...
@@ -63,7 +63,7 @@ class IconsDemoState extends State<IconsDemo> {
Widget
build
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
textStyle
=
theme
.
text
.
subhead
.
copyWith
(
color:
theme
.
text
.
caption
.
color
);
final
TextStyle
textStyle
=
theme
.
text
Theme
.
subhead
.
copyWith
(
color:
theme
.
textTheme
.
caption
.
color
);
return
new
Scaffold
(
toolBar:
new
ToolBar
(
...
...
examples/material_gallery/lib/demo/progress_indicator_demo.dart
View file @
7ba19605
...
...
@@ -85,7 +85,7 @@ class _ProgressIndicatorDemoState extends State<ProgressIndicatorDemo> {
return
new
Scaffold
(
toolBar:
new
ToolBar
(
center:
new
Text
(
'Progress Indicators'
)),
body:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
title
,
style:
Theme
.
of
(
context
).
text
Theme
.
title
,
child:
new
GestureDetector
(
onTap:
_handleTap
,
behavior:
HitTestBehavior
.
opaque
,
...
...
examples/material_gallery/lib/demo/scrolling_techniques_demo.dart
View file @
7ba19605
...
...
@@ -26,7 +26,7 @@ class _BarGraphic extends StatelessComponent {
padding:
const
EdgeDims
.
symmetric
(
horizontal:
16.0
),
decoration:
new
BoxDecoration
(
backgroundColor:
color
),
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
body1
.
copyWith
(
color:
Colors
.
white
),
style:
Theme
.
of
(
context
).
text
Theme
.
body1
.
copyWith
(
color:
Colors
.
white
),
child:
new
Row
(
justifyContent:
FlexJustifyContent
.
spaceBetween
,
children:
<
Widget
>[
...
...
@@ -120,7 +120,7 @@ class ScrollingTechniquesDemo extends StatelessComponent {
children:
<
Widget
>[
new
Padding
(
padding:
const
EdgeDims
.
symmetric
(
horizontal:
16.0
,
vertical:
32.0
),
child:
new
Text
(
_introText
,
style:
Theme
.
of
(
context
).
text
.
caption
)
child:
new
Text
(
_introText
,
style:
Theme
.
of
(
context
).
text
Theme
.
caption
)
),
new
_TechniqueItem
(
builder:
(
BuildContext
context
)
=>
new
FlexibleSpaceDemo
(),
...
...
examples/material_gallery/lib/demo/tabs_fab_demo.dart
View file @
7ba19605
...
...
@@ -60,7 +60,7 @@ class _TabsFabDemoState extends State<TabsFabDemo> {
),
child:
new
Padding
(
padding:
const
EdgeDims
.
all
(
32.0
),
child:
new
Text
(
_explanatoryText
,
style:
Theme
.
of
(
context
).
text
.
subhead
)
child:
new
Text
(
_explanatoryText
,
style:
Theme
.
of
(
context
).
text
Theme
.
subhead
)
)
);
});
...
...
examples/material_gallery/lib/demo/tooltip_demo.dart
View file @
7ba19605
...
...
@@ -21,10 +21,10 @@ class TooltipDemo extends StatelessComponent {
return
new
Column
(
alignItems:
FlexAlignItems
.
stretch
,
children:
<
Widget
>[
new
Text
(
_introText
,
style:
theme
.
text
.
subhead
),
new
Text
(
_introText
,
style:
theme
.
text
Theme
.
subhead
),
new
Row
(
children:
<
Widget
>[
new
Text
(
'Long press the '
,
style:
theme
.
text
.
subhead
),
new
Text
(
'Long press the '
,
style:
theme
.
text
Theme
.
subhead
),
new
Tooltip
(
message:
'call icon'
,
child:
new
Icon
(
...
...
@@ -33,7 +33,7 @@ class TooltipDemo extends StatelessComponent {
color:
theme
.
primaryColor
)
),
new
Text
(
' icon'
,
style:
theme
.
text
.
subhead
)
new
Text
(
' icon'
,
style:
theme
.
text
Theme
.
subhead
)
]
),
new
Center
(
...
...
examples/material_gallery/lib/demo/typography_demo.dart
View file @
7ba19605
...
...
@@ -18,7 +18,7 @@ class TextStyleItem extends StatelessComponent {
Widget
build
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
nameStyle
=
theme
.
text
.
body1
.
copyWith
(
color:
theme
.
text
.
caption
.
color
);
final
TextStyle
nameStyle
=
theme
.
text
Theme
.
body1
.
copyWith
(
color:
theme
.
textTheme
.
caption
.
color
);
return
new
Padding
(
padding:
const
EdgeDims
.
symmetric
(
horizontal:
8.0
,
vertical:
16.0
),
child:
new
Row
(
...
...
@@ -39,7 +39,7 @@ class TextStyleItem extends StatelessComponent {
class
TypographyDemo
extends
StatelessComponent
{
Widget
build
(
BuildContext
context
)
{
final
TextTheme
textTheme
=
Theme
.
of
(
context
).
text
;
final
TextTheme
textTheme
=
Theme
.
of
(
context
).
text
Theme
;
final
List
<
Widget
>
styleItems
=
<
Widget
>[
new
TextStyleItem
(
name:
'display3'
,
style:
textTheme
.
display3
,
text:
'Regular 56sp'
),
new
TextStyleItem
(
name:
'display2'
,
style:
textTheme
.
display2
,
text:
'Regular 45sp'
),
...
...
examples/material_gallery/lib/gallery/section.dart
View file @
7ba19605
...
...
@@ -66,7 +66,7 @@ class GallerySection extends StatelessComponent {
brightness:
Theme
.
of
(
context
).
brightness
,
primarySwatch:
colors
);
final
TextStyle
titleTextStyle
=
theme
.
text
.
title
.
copyWith
(
final
TextStyle
titleTextStyle
=
theme
.
text
Theme
.
title
.
copyWith
(
color:
Colors
.
white
);
return
new
Flexible
(
...
...
examples/stocks/lib/stock_symbol_viewer.dart
View file @
7ba19605
...
...
@@ -19,7 +19,7 @@ class StockSymbolView extends StatelessComponent {
if
(
stock
.
percentChange
>
0
)
changeInPrice
=
"+"
+
changeInPrice
;
TextStyle
headings
=
Theme
.
of
(
context
).
text
.
body2
;
TextStyle
headings
=
Theme
.
of
(
context
).
text
Theme
.
body2
;
return
new
Container
(
padding:
new
EdgeDims
.
all
(
20.0
),
child:
new
Column
(
...
...
@@ -28,7 +28,7 @@ class StockSymbolView extends StatelessComponent {
children:
<
Widget
>[
new
Text
(
'
${stock.symbol}
'
,
style:
Theme
.
of
(
context
).
text
.
display2
style:
Theme
.
of
(
context
).
text
Theme
.
display2
),
new
Hero
(
key:
new
ObjectKey
(
stock
),
...
...
packages/flutter/lib/src/material/button.dart
View file @
7ba19605
...
...
@@ -123,7 +123,7 @@ abstract class MaterialButtonState<T extends MaterialButton> extends State<T> {
)
)
);
TextStyle
style
=
Theme
.
of
(
context
).
text
.
button
.
copyWith
(
color:
getTextColor
(
context
));
TextStyle
style
=
Theme
.
of
(
context
).
text
Theme
.
button
.
copyWith
(
color:
getTextColor
(
context
));
int
elevation
=
this
.
elevation
;
Color
color
=
getColor
(
context
);
if
(
elevation
>
0
||
color
!=
null
)
{
...
...
packages/flutter/lib/src/material/date_picker.dart
View file @
7ba19605
...
...
@@ -183,7 +183,7 @@ class DayPicker extends StatelessComponent {
Widget
build
(
BuildContext
context
)
{
ThemeData
themeData
=
Theme
.
of
(
context
);
TextStyle
headerStyle
=
themeData
.
text
.
caption
.
copyWith
(
fontWeight:
FontWeight
.
w700
);
TextStyle
headerStyle
=
themeData
.
text
Theme
.
caption
.
copyWith
(
fontWeight:
FontWeight
.
w700
);
TextStyle
monthStyle
=
headerStyle
.
copyWith
(
fontSize:
14.0
,
height:
24.0
/
14.0
);
TextStyle
dayStyle
=
headerStyle
.
copyWith
(
fontWeight:
FontWeight
.
w500
);
DateFormat
dateFormat
=
new
DateFormat
();
...
...
@@ -376,7 +376,7 @@ class _YearPickerState extends State<YearPicker> {
static
const
double
_itemExtent
=
50.0
;
List
<
Widget
>
buildItems
(
BuildContext
context
,
int
start
,
int
count
)
{
TextStyle
style
=
Theme
.
of
(
context
).
text
.
body1
.
copyWith
(
color:
Colors
.
black54
);
TextStyle
style
=
Theme
.
of
(
context
).
text
Theme
.
body1
.
copyWith
(
color:
Colors
.
black54
);
List
<
Widget
>
items
=
new
List
<
Widget
>();
for
(
int
i
=
start
;
i
<
start
+
count
;
i
++)
{
int
year
=
config
.
firstDate
.
year
+
i
;
...
...
packages/flutter/lib/src/material/dialog.dart
View file @
7ba19605
...
...
@@ -65,7 +65,7 @@ class Dialog extends StatelessComponent {
dialogBody
.
add
(
new
Padding
(
padding:
padding
,
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
title
,
style:
Theme
.
of
(
context
).
text
Theme
.
title
,
child:
title
)
));
...
...
@@ -78,7 +78,7 @@ class Dialog extends StatelessComponent {
dialogBody
.
add
(
new
Padding
(
padding:
padding
,
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
subhead
,
style:
Theme
.
of
(
context
).
text
Theme
.
subhead
,
child:
content
)
));
...
...
packages/flutter/lib/src/material/drawer_header.dart
View file @
7ba19605
...
...
@@ -38,7 +38,7 @@ class DrawerHeader extends StatelessComponent {
new
Container
(
padding:
const
EdgeDims
.
symmetric
(
horizontal:
16.0
),
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
body2
,
style:
Theme
.
of
(
context
).
text
Theme
.
body2
,
child:
child
)
)
...
...
packages/flutter/lib/src/material/drawer_item.dart
View file @
7ba19605
...
...
@@ -43,7 +43,7 @@ class DrawerItem extends StatelessComponent {
}
TextStyle
_getTextStyle
(
ThemeData
themeData
)
{
TextStyle
result
=
themeData
.
text
.
body2
;
TextStyle
result
=
themeData
.
text
Theme
.
body2
;
if
(
selected
)
{
switch
(
themeData
.
brightness
)
{
case
ThemeBrightness
.
light
:
...
...
packages/flutter/lib/src/material/dropdown.dart
View file @
7ba19605
...
...
@@ -212,7 +212,7 @@ class DropDownMenuItem<T> extends StatelessComponent {
height:
_kMenuItemHeight
,
padding:
const
EdgeDims
.
only
(
left:
8.0
,
right:
8.0
,
top:
6.0
),
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
subhead
,
style:
Theme
.
of
(
context
).
text
Theme
.
subhead
,
child:
new
Baseline
(
baseline:
_kMenuItemHeight
-
_kBaselineOffsetFromBottom
,
child:
child
...
...
packages/flutter/lib/src/material/input.dart
View file @
7ba19605
...
...
@@ -84,7 +84,7 @@ class _InputState extends State<Input> {
BuildContext
focusContext
=
focusKey
.
currentContext
;
bool
focused
=
focusContext
!=
null
&&
Focus
.
at
(
focusContext
,
autofocus:
config
.
autofocus
);
TextStyle
textStyle
=
config
.
style
??
themeData
.
text
.
subhead
;
TextStyle
textStyle
=
config
.
style
??
themeData
.
text
Theme
.
subhead
;
Color
activeColor
=
themeData
.
hintColor
;
if
(
focused
)
{
switch
(
themeData
.
brightness
)
{
...
...
@@ -104,10 +104,10 @@ class _InputState extends State<Input> {
if
(
config
.
labelText
!=
null
)
{
TextStyle
labelStyle
=
hasInlineLabel
?
themeData
.
text
.
subhead
.
copyWith
(
color:
themeData
.
hintColor
)
:
themeData
.
text
.
caption
.
copyWith
(
color:
activeColor
);
themeData
.
text
Theme
.
subhead
.
copyWith
(
color:
themeData
.
hintColor
)
:
themeData
.
text
Theme
.
caption
.
copyWith
(
color:
activeColor
);
double
topPaddingIncrement
=
themeData
.
text
.
caption
.
fontSize
+
(
config
.
isDense
?
4.0
:
8.0
);
double
topPaddingIncrement
=
themeData
.
text
Theme
.
caption
.
fontSize
+
(
config
.
isDense
?
4.0
:
8.0
);
double
top
=
topPadding
;
if
(
hasInlineLabel
)
top
+=
topPaddingIncrement
+
textStyle
.
fontSize
-
labelStyle
.
fontSize
;
...
...
@@ -124,7 +124,7 @@ class _InputState extends State<Input> {
}
if
(
config
.
hintText
!=
null
&&
config
.
value
.
text
.
isEmpty
&&
!
hasInlineLabel
)
{
TextStyle
hintStyle
=
themeData
.
text
.
subhead
.
copyWith
(
color:
themeData
.
hintColor
);
TextStyle
hintStyle
=
themeData
.
text
Theme
.
subhead
.
copyWith
(
color:
themeData
.
hintColor
);
stackChildren
.
add
(
new
Positioned
(
left:
0.0
,
top:
topPadding
+
textStyle
.
fontSize
-
hintStyle
.
fontSize
,
...
...
@@ -174,7 +174,7 @@ class _InputState extends State<Input> {
));
if
(
config
.
errorText
!=
null
&&
!
config
.
isDense
)
{
TextStyle
errorStyle
=
themeData
.
text
.
caption
.
copyWith
(
color:
themeData
.
errorColor
);
TextStyle
errorStyle
=
themeData
.
text
Theme
.
caption
.
copyWith
(
color:
themeData
.
errorColor
);
stackChildren
.
add
(
new
Positioned
(
left:
0.0
,
bottom:
0.0
,
...
...
packages/flutter/lib/src/material/list_item.dart
View file @
7ba19605
...
...
@@ -69,7 +69,7 @@ class ListItem extends StatelessComponent {
TextStyle
primaryTextStyle
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
style
=
theme
.
text
.
subhead
;
final
TextStyle
style
=
theme
.
text
Theme
.
subhead
;
if
(!
enabled
)
{
final
Color
color
=
theme
.
disabledColor
;
return
dense
?
style
.
copyWith
(
fontSize:
13.0
,
color:
color
)
:
style
.
copyWith
(
color:
color
);
...
...
@@ -79,8 +79,8 @@ class ListItem extends StatelessComponent {
TextStyle
secondaryTextStyle
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
Color
color
=
theme
.
text
.
caption
.
color
;
final
TextStyle
style
=
theme
.
text
.
body1
;
final
Color
color
=
theme
.
text
Theme
.
caption
.
color
;
final
TextStyle
style
=
theme
.
text
Theme
.
body1
;
return
dense
?
style
.
copyWith
(
color:
color
,
fontSize:
12.0
)
:
style
.
copyWith
(
color:
color
);
}
...
...
packages/flutter/lib/src/material/material.dart
View file @
7ba19605
...
...
@@ -130,7 +130,7 @@ class _MaterialState extends State<Material> {
Widget
contents
=
config
.
child
;
if
(
contents
!=
null
)
{
contents
=
new
DefaultTextStyle
(
style:
config
.
textStyle
??
Theme
.
of
(
context
).
text
.
body1
,
style:
config
.
textStyle
??
Theme
.
of
(
context
).
text
Theme
.
body1
,
child:
contents
);
}
...
...
packages/flutter/lib/src/material/popup_menu.dart
View file @
7ba19605
...
...
@@ -75,7 +75,7 @@ class _PopupMenuItemState<T extends PopupMenuItem<dynamic>> extends State<T> {
Widget
build
(
BuildContext
context
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
TextStyle
style
=
theme
.
text
.
subhead
;
TextStyle
style
=
theme
.
text
Theme
.
subhead
;
if
(!
config
.
enabled
)
style
=
style
.
copyWith
(
color:
theme
.
disabledColor
);
...
...
packages/flutter/lib/src/material/snack_bar.dart
View file @
7ba19605
...
...
@@ -126,7 +126,7 @@ class SnackBar extends StatelessComponent {
brightness:
ThemeBrightness
.
dark
,
accentColor:
theme
.
accentColor
,
accentColorBrightness:
theme
.
accentColorBrightness
,
text:
Typography
.
white
text
Theme
:
Typography
.
white
),
child:
new
FadeTransition
(
opacity:
fadeAnimation
,
...
...
packages/flutter/lib/src/material/theme_data.dart
View file @
7ba19605
...
...
@@ -52,7 +52,7 @@ class ThemeData {
Color
hintColor
,
double
hintOpacity
,
Color
errorColor
,
TextTheme
text
,
TextTheme
text
Theme
,
TextTheme
primaryTextTheme
,
IconThemeData
primaryIconTheme
})
{
...
...
@@ -77,7 +77,7 @@ class ThemeData {
hintColor
??=
isDark
?
const
Color
(
0x42FFFFFF
)
:
const
Color
(
0x4C000000
);
hintOpacity
??=
hintColor
!=
null
?
hintColor
.
alpha
/
0xFF
:
isDark
?
0.26
:
0.30
;
errorColor
??=
Colors
.
red
[
700
];
text
??=
isDark
?
Typography
.
white
:
Typography
.
black
;
text
Theme
??=
isDark
?
Typography
.
white
:
Typography
.
black
;
primaryTextTheme
??=
primaryColorBrightness
==
ThemeBrightness
.
dark
?
Typography
.
white
:
Typography
.
black
;
primaryIconTheme
??=
primaryColorBrightness
==
ThemeBrightness
.
dark
?
const
IconThemeData
(
color:
Colors
.
white
)
:
const
IconThemeData
(
color:
Colors
.
black
);
return
new
ThemeData
.
raw
(
...
...
@@ -100,7 +100,7 @@ class ThemeData {
hintColor:
hintColor
,
hintOpacity:
hintOpacity
,
errorColor:
errorColor
,
text
:
text
,
text
Theme:
textTheme
,
primaryTextTheme:
primaryTextTheme
,
primaryIconTheme:
primaryIconTheme
);
...
...
@@ -126,7 +126,7 @@ class ThemeData {
this
.
hintColor
,
this
.
hintOpacity
,
this
.
errorColor
,
this
.
text
,
this
.
text
Theme
,
this
.
primaryTextTheme
,
this
.
primaryIconTheme
})
{
...
...
@@ -149,7 +149,7 @@ class ThemeData {
assert
(
hintColor
!=
null
);
assert
(
hintOpacity
!=
null
);
assert
(
errorColor
!=
null
);
assert
(
text
!=
null
);
assert
(
text
Theme
!=
null
);
assert
(
primaryTextTheme
!=
null
);
assert
(
primaryIconTheme
!=
null
);
}
...
...
@@ -207,7 +207,7 @@ class ThemeData {
final
Color
errorColor
;
/// Text with a color that contrasts with the card and canvas colors.
final
TextTheme
text
;
final
TextTheme
text
Theme
;
/// A text theme that contrasts with the primary color.
final
TextTheme
primaryTextTheme
;
...
...
@@ -235,7 +235,7 @@ class ThemeData {
hintColor:
Color
.
lerp
(
begin
.
hintColor
,
end
.
hintColor
,
t
),
hintOpacity:
lerpDouble
(
begin
.
hintOpacity
,
end
.
hintOpacity
,
t
),
errorColor:
Color
.
lerp
(
begin
.
errorColor
,
end
.
errorColor
,
t
),
text
:
TextTheme
.
lerp
(
begin
.
text
,
end
.
text
,
t
),
text
Theme:
TextTheme
.
lerp
(
begin
.
textTheme
,
end
.
textTheme
,
t
),
primaryTextTheme:
TextTheme
.
lerp
(
begin
.
primaryTextTheme
,
end
.
primaryTextTheme
,
t
),
primaryIconTheme:
IconThemeData
.
lerp
(
begin
.
primaryIconTheme
,
end
.
primaryIconTheme
,
t
)
);
...
...
@@ -264,7 +264,7 @@ class ThemeData {
(
otherData
.
hintColor
==
hintColor
)
&&
(
otherData
.
hintOpacity
==
hintOpacity
)
&&
(
otherData
.
errorColor
==
errorColor
)
&&
(
otherData
.
text
==
text
)
&&
(
otherData
.
text
Theme
==
textTheme
)
&&
(
otherData
.
primaryTextTheme
==
primaryTextTheme
)
&&
(
otherData
.
primaryIconTheme
==
primaryIconTheme
);
}
...
...
@@ -290,7 +290,7 @@ class ThemeData {
hintColor
,
hintOpacity
,
errorColor
,
text
,
text
Theme
,
primaryTextTheme
,
primaryIconTheme
)
...
...
packages/flutter/lib/src/material/tooltip.dart
View file @
7ba19605
...
...
@@ -132,7 +132,7 @@ class _TooltipState extends State<Tooltip> {
RenderBox
box
=
context
.
findRenderObject
();
Point
target
=
box
.
localToGlobal
(
box
.
size
.
center
(
Point
.
origin
));
_entry
=
new
OverlayEntry
(
builder:
(
BuildContext
context
)
{
TextStyle
textStyle
=
(
config
.
style
??
Theme
.
of
(
context
).
text
.
body1
).
copyWith
(
color:
config
.
textColor
??
Colors
.
white
);
TextStyle
textStyle
=
(
config
.
style
??
Theme
.
of
(
context
).
text
Theme
.
body1
).
copyWith
(
color:
config
.
textColor
??
Colors
.
white
);
return
new
_TooltipOverlay
(
message:
config
.
message
,
backgroundColor:
config
.
backgroundColor
??
Colors
.
grey
[
700
],
...
...
packages/flutter/lib/src/material/two_level_list.dart
View file @
7ba19605
...
...
@@ -110,7 +110,7 @@ class _TwoLevelSublistState extends State<TwoLevelSublist> {
onTap:
_handleOnTap
,
left:
config
.
left
,
center:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
subhead
.
copyWith
(
color:
_headerColor
.
evaluate
(
_easeInAnimation
)),
style:
Theme
.
of
(
context
).
text
Theme
.
subhead
.
copyWith
(
color:
_headerColor
.
evaluate
(
_easeInAnimation
)),
child:
config
.
center
),
right:
new
RotationTransition
(
...
...
@@ -136,7 +136,7 @@ class _TwoLevelSublistState extends State<TwoLevelSublist> {
final
ThemeData
theme
=
Theme
.
of
(
context
);
_borderColor
.
end
=
theme
.
dividerColor
;
_headerColor
..
begin
=
theme
.
text
.
subhead
.
color
..
begin
=
theme
.
text
Theme
.
subhead
.
color
..
end
=
theme
.
accentColor
;
_iconColor
..
begin
=
theme
.
unselectedColor
...
...
packages/flutter_markdown/lib/src/markdown_style.dart
View file @
7ba19605
...
...
@@ -12,21 +12,21 @@ class MarkdownStyle extends MarkdownStyleRaw{
/// Creates a [MarkdownStyle] from the [TextStyle]s in the provided [theme].
MarkdownStyle
.
defaultFromTheme
(
ThemeData
theme
)
:
super
(
a:
new
TextStyle
(
color:
Colors
.
blue
[
500
]),
p:
theme
.
text
.
body1
,
p:
theme
.
text
Theme
.
body1
,
code:
new
TextStyle
(
color:
Colors
.
grey
[
700
],
fontFamily:
"monospace"
,
fontSize:
theme
.
text
.
body1
.
fontSize
*
0.85
fontSize:
theme
.
text
Theme
.
body1
.
fontSize
*
0.85
),
h1:
theme
.
text
.
headline
,
h2:
theme
.
text
.
title
,
h3:
theme
.
text
.
subhead
,
h4:
theme
.
text
.
body2
,
h5:
theme
.
text
.
body2
,
h6:
theme
.
text
.
body2
,
h1:
theme
.
text
Theme
.
headline
,
h2:
theme
.
text
Theme
.
title
,
h3:
theme
.
text
Theme
.
subhead
,
h4:
theme
.
text
Theme
.
body2
,
h5:
theme
.
text
Theme
.
body2
,
h6:
theme
.
text
Theme
.
body2
,
em:
new
TextStyle
(
fontStyle:
FontStyle
.
italic
),
strong:
new
TextStyle
(
fontWeight:
FontWeight
.
bold
),
blockquote:
theme
.
text
.
body1
,
blockquote:
theme
.
text
Theme
.
body1
,
blockSpacing:
8.0
,
listIndent:
32.0
,
blockquotePadding:
8.0
,
...
...
@@ -46,21 +46,21 @@ class MarkdownStyle extends MarkdownStyleRaw{
/// [MarkdownStyle.defaultFromTheme].
MarkdownStyle
.
largeFromTheme
(
ThemeData
theme
)
:
super
(
a:
new
TextStyle
(
color:
Colors
.
blue
[
500
]),
p:
theme
.
text
.
body1
,
p:
theme
.
text
Theme
.
body1
,
code:
new
TextStyle
(
color:
Colors
.
grey
[
700
],
fontFamily:
"monospace"
,
fontSize:
theme
.
text
.
body1
.
fontSize
*
0.85
fontSize:
theme
.
text
Theme
.
body1
.
fontSize
*
0.85
),
h1:
theme
.
text
.
display3
,
h2:
theme
.
text
.
display2
,
h3:
theme
.
text
.
display1
,
h4:
theme
.
text
.
headline
,
h5:
theme
.
text
.
title
,
h6:
theme
.
text
.
subhead
,
h1:
theme
.
text
Theme
.
display3
,
h2:
theme
.
text
Theme
.
display2
,
h3:
theme
.
text
Theme
.
display1
,
h4:
theme
.
text
Theme
.
headline
,
h5:
theme
.
text
Theme
.
title
,
h6:
theme
.
text
Theme
.
subhead
,
em:
new
TextStyle
(
fontStyle:
FontStyle
.
italic
),
strong:
new
TextStyle
(
fontWeight:
FontWeight
.
bold
),
blockquote:
theme
.
text
.
body1
,
blockquote:
theme
.
text
Theme
.
body1
,
blockSpacing:
8.0
,
listIndent:
32.0
,
blockquotePadding:
8.0
,
...
...
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