of static method
- BuildContext context
The theme to use inside context: the registered extension, else one
derived from the ambient brightness.
Implementation
// Static by design (mirrors Theme.of).
// ignore: prefer_constructors_over_static_methods
static HatangChatTheme of(BuildContext context) =>
Theme.of(context).extension<HatangChatTheme>() ?? HatangChatTheme.fromSite(null, Theme.of(context).brightness);