getUiToApply method

UiToApply getUiToApply(
  1. UiMode uiMode
)

Implementation

UiToApply getUiToApply(UiMode uiMode) {
  switch (uiMode) {
    case UiMode.cupertino:
      return UiToApply.cupertino;
    case UiMode.adaptive:
      final ThemeData theme = Theme.of(this);
      switch (theme.platform) {
        case TargetPlatform.iOS:
        case TargetPlatform.macOS:
          return UiToApply.cupertino;
        case TargetPlatform.android:
        case TargetPlatform.fuchsia:
        case TargetPlatform.linux:
        case TargetPlatform.windows:
        default:
          return UiToApply.material;
      }
    case UiMode.material:
    default:
      return UiToApply.material;
  }
}