of static method
Returns the data from the closest InfoBarTheme ancestor. If there is no ancestor, it returns ThemeData.infoBarTheme. Applications can assume that the returned value will not be null.
Typical usage is as follows:
InfoBarThemeData theme = InfoBarTheme.of(context);
Implementation
static InfoBarThemeData of(BuildContext context) {
final InfoBarTheme? theme =
context.dependOnInheritedWidgetOfExactType<InfoBarTheme>();
return InfoBarThemeData.standard(FluentTheme.of(context)).merge(
theme?.data ?? FluentTheme.of(context).infoBarTheme,
);
}