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
8f2d40c2
Commit
8f2d40c2
authored
Nov 01, 2016
by
Chris Bracken
Committed by
GitHub
Nov 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract time picker typography from theme (#6627)
parent
e6da16bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
25 deletions
+5
-25
time_picker.dart
packages/flutter/lib/src/material/time_picker.dart
+5
-25
No files found.
packages/flutter/lib/src/material/time_picker.dart
View file @
8f2d40c2
...
...
@@ -513,11 +513,6 @@ class _DialState extends State<_Dial> with SingleTickerProviderStateMixin {
_animateTo
(
_getThetaForTime
(
config
.
selectedTime
));
}
final
List
<
TextPainter
>
_hoursWhite
=
_initHours
(
Typography
.
white
);
final
List
<
TextPainter
>
_hoursBlack
=
_initHours
(
Typography
.
black
);
final
List
<
TextPainter
>
_minutesWhite
=
_initMinutes
(
Typography
.
white
);
final
List
<
TextPainter
>
_minutesBlack
=
_initMinutes
(
Typography
.
black
);
@override
Widget
build
(
BuildContext
context
)
{
ThemeData
themeData
=
Theme
.
of
(
context
);
...
...
@@ -532,32 +527,17 @@ class _DialState extends State<_Dial> with SingleTickerProviderStateMixin {
break
;
}
ThemeData
theme
=
Theme
.
of
(
context
);
List
<
TextPainter
>
primaryLabels
;
List
<
TextPainter
>
secondaryLabels
;
switch
(
config
.
mode
)
{
case
_TimePickerMode
.
hour
:
switch
(
themeData
.
brightness
)
{
case
Brightness
.
light
:
primaryLabels
=
_hoursBlack
;
secondaryLabels
=
_hoursWhite
;
break
;
case
Brightness
.
dark
:
primaryLabels
=
_hoursWhite
;
secondaryLabels
=
_hoursBlack
;
break
;
}
primaryLabels
=
_initHours
(
theme
.
textTheme
);
secondaryLabels
=
_initHours
(
theme
.
primaryTextTheme
);
break
;
case
_TimePickerMode
.
minute
:
switch
(
themeData
.
brightness
)
{
case
Brightness
.
light
:
primaryLabels
=
_minutesBlack
;
secondaryLabels
=
_minutesWhite
;
break
;
case
Brightness
.
dark
:
primaryLabels
=
_minutesWhite
;
secondaryLabels
=
_minutesBlack
;
break
;
}
primaryLabels
=
_initMinutes
(
theme
.
textTheme
);
secondaryLabels
=
_initMinutes
(
theme
.
primaryTextTheme
);
break
;
}
...
...
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