setTheme method
Sets a theme from package:flutter/material.dart on the SDK host.
Migration notice: standalone material_ui.ThemeData is a different
type. This API remains supported pending a stable standalone replacement.
See the migration guide.
Implementation
void setTheme(ThemeData value) {
if (config.darkTheme == null) {
config = config.copyWith(theme: value);
} else {
if (value.brightness == Brightness.light) {
config = config.copyWith(theme: value);
} else {
config = config.copyWith(darkTheme: value);
}
}
update();
}