ImageScopeConfiguration class

A configuration class for managing image URLs and their corresponding descriptions.

This class is used to configure the images and their optional descriptions for the image scope feature. It ensures that the number of descriptions matches the number of images when descriptions are provided, throwing an error if there is a mismatch.

Constructor Parameters:

  • imageUrls: A required list of image URLs to be displayed in the image scope.

  • descriptions: An optional list of descriptions corresponding to the images. If provided, it must have the same length as the imageUrls list.

  • showDescription: A boolean flag indicating whether descriptions should be shown. Defaults to false if not provided.

Throws:

Example:

ImageScopeConfiguration(
  imageUrls: ['image1.jpg', 'image2.jpg'],  // List of image URLs
  descriptions: ['Description for image 1', 'Description for image 2'],  // Descriptions corresponding to each image
  showDescription: true,  // Enabling description visibility
);

Usage Notes:

  • Ensure that the number of descriptions matches the number of images when showDescription is true.
  • If no descriptions are required, either provide null for descriptions or omit it entirely.

Constructors

ImageScopeConfiguration({required List<String> imageUrls, List<String>? descriptions, bool? showDescription})
Creates a image configuration with optional descriptions.

Properties

descriptions List<String>?
final
hashCode int
The hash code for this object.
no setterinherited
imageUrls List<String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDescription bool?
getter/setter pair

Methods

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

Operators

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