ImagenSafetyFilterLevel enum

Specifies the level of safety filtering for image generation.

If not specified, default will be "block_medium_and_above".

Inheritance
Available extensions
Annotations
  • @Deprecated('All Imagen models are deprecated and will shut down as early as June 2026. ' 'As a replacement, you can migrate your apps to use Gemini Image models (the ' '"Nano Banana" models)(https://firebase.google.com/docs/ai-logic/imagen-models-migration).')

Values

blockLowAndAbove → const ImagenSafetyFilterLevel

Strongest filtering level, most strict blocking.

const ImagenSafetyFilterLevel('block_low_and_above')
blockMediumAndAbove → const ImagenSafetyFilterLevel

Block some problematic prompts and responses.

const ImagenSafetyFilterLevel('block_medium_and_above')
blockOnlyHigh → const ImagenSafetyFilterLevel

Reduces the number of requests blocked due to safety filters. May increase objectionable content generated by Imagen.

const ImagenSafetyFilterLevel('block_only_high')
blockNone → const ImagenSafetyFilterLevel

Block very few problematic prompts and responses. Access to this feature is restricted.

const ImagenSafetyFilterLevel('block_none')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ImagenSafetyFilterLevel>
A constant List of the values in this enum, in order of their declaration.