UnaMaterial constructor

const UnaMaterial({
  1. Key? key,
  2. required Widget child,
  3. ThemeData themeBuilder(
    1. BuildContext context,
    2. ThemeData theme
    )?,
})

Lets Material and Cupertino widgets in child follow the nearest una theme.

It installs the Material m.Theme that materialThemeFrom derives (Cupertino widgets take their theme from it) and a transparent Material, and adds the Material and Cupertino localizations when no ancestor provides them. Widgets such as TextField, Slider and InkWell need all three.

Put one around the whole app through UnaApp.builder, or around a subtree. Inside a UnaThemeScope it follows that scope's theme.

Implementation

const UnaMaterial({super.key, required this.child, this.themeBuilder});