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
d8b7eb6e
Unverified
Commit
d8b7eb6e
authored
Dec 14, 2022
by
Darren Austin
Committed by
GitHub
Dec 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated token templates to sync with master code. (#117097)
parent
aa0b6811
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
9 deletions
+13
-9
action_chip_template.dart
dev/tools/gen_defaults/lib/action_chip_template.dart
+1
-1
filter_chip_template.dart
dev/tools/gen_defaults/lib/filter_chip_template.dart
+1
-1
input_chip_template.dart
dev/tools/gen_defaults/lib/input_chip_template.dart
+1
-1
menu_template.dart
dev/tools/gen_defaults/lib/menu_template.dart
+4
-1
time_picker_template.dart
dev/tools/gen_defaults/lib/time_picker_template.dart
+5
-2
time_picker.dart
packages/flutter/lib/src/material/time_picker.dart
+1
-3
No files found.
dev/tools/gen_defaults/lib/action_chip_template.dart
View file @
d8b7eb6e
...
...
@@ -72,7 +72,7 @@ class _${blockName}DefaultsM3 extends ChipThemeData {
EdgeInsetsGeometry? get labelPadding => EdgeInsets.lerp(
const EdgeInsets.symmetric(horizontal: 8.0),
const EdgeInsets.symmetric(horizontal: 4.0),
clampDouble(MediaQuery.
of(context).textScaleFactor
- 1.0, 0.0, 1.0),
clampDouble(MediaQuery.
textScaleFactorOf(context)
- 1.0, 0.0, 1.0),
)!;
}
'''
;
...
...
dev/tools/gen_defaults/lib/filter_chip_template.dart
View file @
d8b7eb6e
...
...
@@ -78,7 +78,7 @@ class _${blockName}DefaultsM3 extends ChipThemeData {
EdgeInsetsGeometry? get labelPadding => EdgeInsets.lerp(
const EdgeInsets.symmetric(horizontal: 8.0),
const EdgeInsets.symmetric(horizontal: 4.0),
clampDouble(MediaQuery.
of(context).textScaleFactor
- 1.0, 0.0, 1.0),
clampDouble(MediaQuery.
textScaleFactorOf(context)
- 1.0, 0.0, 1.0),
)!;
}
'''
;
...
...
dev/tools/gen_defaults/lib/input_chip_template.dart
View file @
d8b7eb6e
...
...
@@ -71,7 +71,7 @@ class _${blockName}DefaultsM3 extends ChipThemeData {
EdgeInsetsGeometry? get labelPadding => EdgeInsets.lerp(
const EdgeInsets.symmetric(horizontal: 8.0),
const EdgeInsets.symmetric(horizontal: 4.0),
clampDouble(MediaQuery.
of(context).textScaleFactor
- 1.0, 0.0, 1.0),
clampDouble(MediaQuery.
textScaleFactorOf(context)
- 1.0, 0.0, 1.0),
)!;
}
'''
;
...
...
dev/tools/gen_defaults/lib/menu_template.dart
View file @
d8b7eb6e
...
...
@@ -18,6 +18,7 @@ class _MenuBarDefaultsM3 extends MenuStyle {
shape: const MaterialStatePropertyAll<OutlinedBorder>(_defaultMenuBorder),
alignment: AlignmentDirectional.bottomStart,
);
static const RoundedRectangleBorder _defaultMenuBorder =
${shape('md.comp.menu.container', '')}
;
...
...
@@ -60,6 +61,7 @@ class _MenuButtonDefaultsM3 extends ButtonStyle {
enableFeedback: true,
alignment: AlignmentDirectional.centerStart,
);
final BuildContext context;
late final ColorScheme _colors = Theme.of(context).colorScheme;
...
...
@@ -190,7 +192,7 @@ class _MenuButtonDefaultsM3 extends ButtonStyle {
const EdgeInsets.symmetric(horizontal: 12),
const EdgeInsets.symmetric(horizontal: 8),
const EdgeInsets.symmetric(horizontal: 4),
MediaQuery.maybe
Of(context)?.textScaleFactor
?? 1,
MediaQuery.maybe
TextScaleFactorOf(context)
?? 1,
);
}
}
...
...
@@ -202,6 +204,7 @@ class _MenuDefaultsM3 extends MenuStyle {
shape: const MaterialStatePropertyAll<OutlinedBorder>(_defaultMenuBorder),
alignment: AlignmentDirectional.topEnd,
);
static const RoundedRectangleBorder _defaultMenuBorder =
${shape('md.comp.menu.container', '')}
;
...
...
dev/tools/gen_defaults/lib/time_picker_template.dart
View file @
d8b7eb6e
...
...
@@ -306,8 +306,11 @@ class _${blockName}DefaultsM3 extends _TimePickerDefaults {
InputDecorationTheme
get
inputDecorationTheme
{
// This is NOT correct, but there's no token for
// 'time-input.container.shape', so this is using the radius from the shape
// for the hour/minute selector.
final
BorderRadiusGeometry
selectorRadius
=
$
{
shape
(
'
$hourMinuteComponent
.container'
)}.
borderRadius
;
// for the hour/minute selector. It's a BorderRadiusGeometry, so we have to
// resolve it before we can use it.
final
BorderRadius
selectorRadius
=
$
{
shape
(
'
$hourMinuteComponent
.container'
)}
.
borderRadius
.
resolve
(
Directionality
.
of
(
context
));
return
InputDecorationTheme
(
contentPadding:
EdgeInsets
.
zero
,
filled:
true
,
...
...
packages/flutter/lib/src/material/time_picker.dart
View file @
d8b7eb6e
...
...
@@ -3684,9 +3684,7 @@ class _TimePickerDefaultsM3 extends _TimePickerDefaults {
// 'time-input.container.shape', so this is using the radius from the shape
// for the hour/minute selector. It's a BorderRadiusGeometry, so we have to
// resolve it before we can use it.
final
BorderRadius
selectorRadius
=
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
8.0
)),
)
final
BorderRadius
selectorRadius
=
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
8.0
)))
.
borderRadius
.
resolve
(
Directionality
.
of
(
context
));
return
InputDecorationTheme
(
...
...
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