apply method
Applies this theme to the child widget.
Implementation
@override
Widget apply(BuildContext context, Widget child) {
final brightness = MediaQuery.platformBrightnessOf(context);
final theme = brightness == Brightness.light ? light : dark;
if (theme != null) {
return Theme(data: theme, child: child);
}
return child;
}