changeUI method

void changeUI(
  1. String? ui
)

Explicity change to a particular interface.

Implementation

void changeUI(String? ui) {
  if (ui == null || ui.isEmpty) {
    return;
  }
  // Assigned to the 'home' StatefulWidget to re-create Stat object.
  homeKey = UniqueKey();
  ui = ui.trim();
  if (ui != 'Material' && ui != 'Cupertino') {
    return;
  }
  if (ui == 'Material') {
    useMaterial = true;
    useCupertino = false;
    switchUI = !UniversalPlatform.isAndroid;
  } else {
    useMaterial = false;
    useCupertino = true;
    switchUI = UniversalPlatform.isAndroid;
  }
}