A Flutter based Cwtch UI https://cwtch.im
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
455 B

  1. # State Management
  2. We use a MultiProvider to distribute state to the underlying widgets. Right now there are 2 top
  3. level Providers: FlwtchState (the app) and OpaqueTheme.
  4. ## Theme
  5. OpaqueTheme extends ChangeProvider. SetLight and SetDark are functions that call notifyListeners()
  6. ChangeNotiferProvider is used to package OpaqueTheme into a provider which is a top level
  7. provider (as every widget in the app needs to be re-rendered on a theme switch).