Reputation: 7216
My app uses dark theme as
ThemeData.dark().copyWith( ... ),
that defined for theme
property of MaterialApp
.
Since the keyboardAppearance
property only works on iOS, it doesn't seem to be possible to do the same on Android. Or is there a way to do this?
Upvotes: 0
Views: 1002
Reputation: 490
Modifying the keyboard color is not possible! In Flutter, the keyboard operates as a native feature. You have the flexibility to determine whether to display it and which keyboard to show. However, since it functions as a distinct application, direct access is not possible..
Upvotes: 0
Reputation: 742
in terms of docs, this functionality doesn't exist for android, unfortunately. This only works for ios:https://api.flutter.dev/flutter/material/TextField/keyboardAppearance.html
And also there is an issue opened on GitHub about that: https://github.com/flutter/flutter/issues/75521
This explains that we can't make a decision in terms of the keyboard's theme from an app. The keyboard is a standalone application, and it's up to the keyboard to decide which theme it would take. It could have been implemented to follow the device's dark mode settings (e.g. Samsung Galaxy's default keyboard), or it could just provide its own settings to change themes dynamically.
Upvotes: 0