ImagenAspectRatio enum

The aspect ratio for the image.

The default value is "1:1".

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

square1x1 → const ImagenAspectRatio

Square (1:1).

const ImagenAspectRatio('1:1')
portrait9x16 → const ImagenAspectRatio

Portrait (9:16).

const ImagenAspectRatio('9:16')
landscape16x9 → const ImagenAspectRatio

Landscape (16:9).

const ImagenAspectRatio('16:9')
portrait3x4 → const ImagenAspectRatio

Portrait (3:4).

const ImagenAspectRatio('3:4')
landscape4x3 → const ImagenAspectRatio

Landscape (4:3).

const ImagenAspectRatio('4:3')

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<ImagenAspectRatio>
A constant List of the values in this enum, in order of their declaration.