create static method

AuthyoStyle create(
  1. AuthyoDesignStyle style,
  2. AuthyoTheme theme
)

Implementation

static AuthyoStyle create(AuthyoDesignStyle style, AuthyoTheme theme) {
  final resolved = theme.resolve();
  switch (style) {
    case AuthyoDesignStyle.flat:
      return FlatStyle(resolved);
    case AuthyoDesignStyle.flat2:
      return Flat2Style(resolved);
    case AuthyoDesignStyle.minimalism:
      return MinimalStyle(resolved);
    case AuthyoDesignStyle.skeuomorphism:
      return SkeuomorphicStyle(resolved);
    case AuthyoDesignStyle.claymorphism:
      return ClayStyle(resolved);
    case AuthyoDesignStyle.glassmorphism:
      return GlassStyle(resolved);
    case AuthyoDesignStyle.neumorphism:
      return NeumorphicStyle(resolved);
  }
}