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
c5d16612
Commit
c5d16612
authored
Sep 07, 2018
by
CaiJingLong
Committed by
Michael Goderbauer
Sep 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ThemeData's cursorColor doesn't work. (#21142)
parent
0235ec59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+1
-1
theme_data_test.dart
packages/flutter/test/material/theme_data_test.dart
+4
-0
No files found.
packages/flutter/lib/src/material/theme_data.dart
View file @
c5d16612
...
...
@@ -174,7 +174,7 @@ class ThemeData extends Diagnosticable {
secondaryHeaderColor
??=
isDark
?
Colors
.
grey
[
700
]
:
primarySwatch
[
50
];
textSelectionColor
??=
isDark
?
accentColor
:
primarySwatch
[
200
];
// todo (sandrasandeep): change to color provided by Material Design team
cursorColor
=
const
Color
.
fromRGBO
(
66
,
133
,
244
,
1.0
);
cursorColor
=
c
ursorColor
??
c
onst
Color
.
fromRGBO
(
66
,
133
,
244
,
1.0
);
textSelectionHandleColor
??=
isDark
?
Colors
.
tealAccent
[
400
]
:
primarySwatch
[
300
];
backgroundColor
??=
isDark
?
Colors
.
grey
[
700
]
:
primarySwatch
[
200
];
dialogBackgroundColor
??=
isDark
?
Colors
.
grey
[
800
]
:
Colors
.
white
;
...
...
packages/flutter/test/material/theme_data_test.dart
View file @
c5d16612
...
...
@@ -142,4 +142,8 @@ void main() {
expect
(
new
ThemeData
(
primaryColor:
Colors
.
teal
).
primaryColorBrightness
,
equals
(
Brightness
.
dark
));
expect
(
new
ThemeData
(
primaryColor:
Colors
.
indigo
).
primaryColorBrightness
,
equals
(
Brightness
.
dark
));
});
test
(
'cursorColor'
,
()
{
expect
(
ThemeData
(
cursorColor:
Colors
.
red
).
cursorColor
,
Colors
.
red
);
});
}
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