Fix ThemeData's cursorColor doesn't work. (#21142)
This commit is contained in:
committed by
Michael Goderbauer
parent
0235ec59d1
commit
c5d16612a5
@@ -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 = cursorColor ?? const 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;
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user