createStyle static method

BaseStandardToastStyle createStyle({
  1. required StandardStyle style,
  2. required ToastificationType type,
  3. StandardStyleValues? providedValues,
  4. ThemeData? flutterTheme,
})

Implementation

static BaseStandardToastStyle createStyle({
  required StandardStyle style,
  required ToastificationType type,
  StandardStyleValues? providedValues,
  ThemeData? flutterTheme,
}) {
  return switch (style) {
    StandardStyle.minimal => MinimalStandardToastStyle(
        type: type,
        providedValues: providedValues,
        flutterTheme: flutterTheme,
      ),
    StandardStyle.fillColored => FilledStandardToastStyle(
        type: type,
        providedValues: providedValues,
        flutterTheme: flutterTheme,
      ),
    StandardStyle.flatColored => FlatStandardColoredToastStyle(
        type: type,
        providedValues: providedValues,
        flutterTheme: flutterTheme,
      ),
    StandardStyle.flat => FlatStandardToastStyle(
        type: type,
        providedValues: providedValues,
        flutterTheme: flutterTheme,
      ),
    StandardStyle.simple => SimpleStandardToastStyle(
        type: type,
        providedValues: providedValues,
        flutterTheme: flutterTheme,
      ),
  };
}