of static method

ChatThemeData of(
  1. BuildContext context
)

The method for the of.

Implementation

static ChatThemeData of(BuildContext context) {
  final ChatTheme? theme =
      context.dependOnInheritedWidgetOfExactType<ChatTheme>();
  return theme?.data ??
      ChatThemeData(
        light: ChatColorThemeData.light,
        dark: ChatColorThemeData.dark,
      );
}