platformThemeData<T> function Null safety

T platformThemeData<T>(
  1. BuildContext context,
  2. {required T material(
    1. ThemeData theme
    ),
  3. required T cupertino(
    1. CupertinoThemeData theme
    )}
)

Implementation

T platformThemeData<T>(
  BuildContext context, {
  required T Function(ThemeData theme) material,
  required T Function(CupertinoThemeData theme) cupertino,
}) {
  return isMaterial(context)
      ? material(Theme.of(context))
      : cupertino(CupertinoTheme.of(context));
}