setMaterialTheme method

void setMaterialTheme(
  1. ThemeData value
)

Changes the standalone Material theme without converting legacy types.

Implementation

void setMaterialTheme(material.ThemeData value) {
  if (!config.useStandaloneDesign) {
    throw StateError('setMaterialTheme requires a standalone SintApp.');
  }
  config = config.materialDarkTheme != null &&
          value.brightness == Brightness.dark
      ? config.copyWith(materialDarkTheme: value)
      : config.copyWith(materialTheme: value);
  update();
}