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
5d555eb2
Unverified
Commit
5d555eb2
authored
May 26, 2023
by
Taha Tesser
Committed by
GitHub
May 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add M3 date range picker tests and fix header background theme color (#127662)
parent
9376a2ac
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
318 additions
and
2 deletions
+318
-2
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+2
-2
date_picker_theme_test.dart
packages/flutter/test/material/date_picker_theme_test.dart
+3
-0
date_range_picker_test.dart
packages/flutter/test/material/date_range_picker_test.dart
+313
-0
No files found.
packages/flutter/lib/src/material/date_picker.dart
View file @
5d555eb2
...
...
@@ -13,7 +13,6 @@ import 'back_button.dart';
import
'button_style.dart'
;
import
'calendar_date_picker.dart'
;
import
'color_scheme.dart'
;
import
'colors.dart'
;
import
'date.dart'
;
import
'date_picker_theme.dart'
;
import
'debug.dart'
;
...
...
@@ -1588,6 +1587,7 @@ class _CalendarRangePickerDialog extends StatelessWidget {
final
DatePickerThemeData
themeData
=
DatePickerTheme
.
of
(
context
);
final
DatePickerThemeData
defaults
=
DatePickerTheme
.
defaults
(
context
);
final
Color
?
dialogBackground
=
themeData
.
rangePickerBackgroundColor
??
defaults
.
rangePickerBackgroundColor
;
final
Color
?
headerBackground
=
themeData
.
rangePickerHeaderBackgroundColor
??
defaults
.
rangePickerHeaderBackgroundColor
;
final
Color
?
headerForeground
=
themeData
.
rangePickerHeaderForegroundColor
??
defaults
.
rangePickerHeaderForegroundColor
;
final
Color
?
headerDisabledForeground
=
headerForeground
?.
withOpacity
(
0.38
);
final
TextStyle
?
headlineStyle
=
themeData
.
rangePickerHeaderHeadlineStyle
??
defaults
.
rangePickerHeaderHeadlineStyle
;
...
...
@@ -1616,7 +1616,7 @@ class _CalendarRangePickerDialog extends StatelessWidget {
actionsIconTheme:
iconTheme
,
elevation:
useMaterial3
?
0
:
null
,
scrolledUnderElevation:
useMaterial3
?
0
:
null
,
backgroundColor:
useMaterial3
?
Colors
.
transparent
:
null
,
backgroundColor:
useMaterial3
?
headerBackground
:
null
,
leading:
CloseButton
(
onPressed:
onCancel
,
),
...
...
packages/flutter/test/material/date_picker_theme_test.dart
View file @
5d555eb2
...
...
@@ -431,6 +431,9 @@ void main() {
expect
(
material
.
surfaceTintColor
,
datePickerTheme
.
rangePickerSurfaceTintColor
);
expect
(
material
.
shape
,
datePickerTheme
.
rangePickerShape
);
final
AppBar
appBar
=
tester
.
widget
<
AppBar
>(
find
.
byType
(
AppBar
));
expect
(
appBar
.
backgroundColor
,
datePickerTheme
.
rangePickerHeaderBackgroundColor
);
final
Text
selectRange
=
tester
.
widget
<
Text
>(
find
.
text
(
'Select range'
));
expect
(
selectRange
.
style
?.
color
,
datePickerTheme
.
rangePickerHeaderForegroundColor
);
expect
(
selectRange
.
style
?.
fontSize
,
datePickerTheme
.
rangePickerHeaderHelpStyle
?.
fontSize
);
...
...
packages/flutter/test/material/date_range_picker_test.dart
View file @
5d555eb2
This diff is collapsed.
Click to expand it.
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