superlistapp / super_editor

A Flutter toolkit for building document editors and readers
https://superlist.com/SuperEditor/
MIT License
1.65k stars 239 forks source link

[BUG] - In SuperEditor it's not straightforward to theme caret/handles on mobile according to brightness #2302

Open miguelcmedeiros opened 1 week ago

miguelcmedeiros commented 1 week ago

Package Version super_editor main branch (c3190a9cc77b25d9ce18c798b1b7cdcecab13ecc)

User Info Superlist

Details The only way I found to consistently customize the color of caret and handles on mobile so that it changes when the brightness changes is to wrap SuperEditor with a Theme:

Theme(
  data: Theme.of(context).copyWith(
    primaryColor:
      Theme.of(context).brightness == Brightness.light
        ? Colors.black
        : Colors.white,
  ),
  child: SuperEditor(...),

Platform iOS and Android

Flutter version Flutter master

miguelcmedeiros commented 1 week ago

Cc @matthew-carroll