Commit c5d16612 authored by CaiJingLong's avatar CaiJingLong Committed by Michael Goderbauer

Fix ThemeData's cursorColor doesn't work. (#21142)

parent 0235ec59
......@@ -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);
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment