BirjuVachhani / adaptive_theme

Easiest way to add support for light and dark theme in your flutter app.
https://pub.dev/packages/adaptive_theme
Apache License 2.0
464 stars 37 forks source link

iOS Keyboard Appearance does not switch automatically under system settings #54

Closed jetlye2804 closed 9 months ago

jetlye2804 commented 9 months ago

Describe the bug When a text input is focused and dark mode is on/off in system settings, the keyboard appearance does not switch immediately. Instead, it only takes effect when dismiss the keyboard or focus on other text input.

To Reproduce Steps to reproduce the behavior:

  1. Set the theme mode to system
  2. Create a text field widget
  3. Focus a text field widget
  4. Open Control Center, enable or disable dark mode (or go to settings > displays to switch dark mode on/off)
  5. Observe the keyboard appearance changes

Expected behavior Under system mode, the keyboard appearance should switch dynamically

Screenshots

https://github.com/BirjuVachhani/adaptive_theme/assets/82960491/fb8b2d2c-5f88-4fa5-afe5-c94c20b129f9

Desktop (please complete the following information): N/A

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

BirjuVachhani commented 9 months ago

@jetlye2804 This is something not for this package to handle. This feels like an issue(maybe limitation?) with Flutter itself. I am sure this would happen even when you don't use this package!(Would be great if you could test and confirm this!). I am not aware of any theme setting or input field setting that you can do to make this work but you should look for one. If you can't find anything, then I'd suggest you to file a bug on Flutter repository.

Feel free to reopen this issue if this only happens when using this library and works perfectly fine you don't use this package!