effectiveStyle method

AdaptiveStyle effectiveStyle(
  1. ThemeData data
)

Implementation

AdaptiveStyle effectiveStyle(ThemeData data) {
  switch (this) {
    case AdaptiveStyle.material:
    // ignore: deprecated_member_use_from_same_package
    case AdaptiveStyle.cupertino:
    case AdaptiveStyle.iOS:
    case AdaptiveStyle.macOS:
      // ignore: avoid_returning_this
      return this;
    case AdaptiveStyle.adaptive:
      switch (data.platform) {
        case TargetPlatform.iOS:
          return AdaptiveStyle.iOS;
        case TargetPlatform.macOS:
          return AdaptiveStyle.macOS;
        case TargetPlatform.android:
        case TargetPlatform.fuchsia:
        case TargetPlatform.linux:
        case TargetPlatform.windows:
          return AdaptiveStyle.material;
      }
  }
}