ofType<T extends FirebaseUIStyle> static method
Resolves the style object via BuildContext and provides a defaultValue
if none was found.
Implementation
static T ofType<T extends FirebaseUIStyle>(
BuildContext context,
T defaultValue,
) {
final el =
context.getElementForInheritedWidgetOfExactType<FirebaseUITheme>();
if (el == null) return defaultValue;
context.dependOnInheritedElement(el, aspect: T);
final style = (el as FirebaseUIThemeElement).styles[T];
if (style == null) return defaultValue;
return style as T;
}