ShadMaterial constructor
const
ShadMaterial({
- Key? key,
- required Widget child,
- ThemeData themeBuilder(
- BuildContext context,
- ThemeData theme
Lets Material and Cupertino widgets in child follow the nearest shad theme.
It installs the Material Theme that shadMaterialThemeFrom 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 ShadApp.builder, or around a
subtree. Inside a ShadThemeScope it follows that scope's theme.
Implementation
const ShadMaterial({super.key, required this.child, this.themeBuilder});