PromoBanner class
Represents a marketing banner or hero promotion that can be displayed inside carousel sections, hero areas, or inline placements.
- Annotations
Constructors
-
PromoBanner({required String id, required String title, required String imageUrl, String type = 'image', String? subtitle, String? description, UserInteraction? action, Map<
String, dynamic> ? metadata, Map<String, dynamic> ? extensions}) -
const
-
PromoBanner.fromJson(Map<
String, dynamic> json) -
Convenience parser for adapters that receive JSON payloads.
factory
Properties
- action → UserInteraction?
-
Structured action invoked when the banner is tapped.
final
- description → String?
-
Optional longer description for accessibility or detail screens.
final
-
extensions
→ Map<
String, dynamic> ? -
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the banner. Typically matches the backend ID.
final
- imageUrl → String
-
Image or video thumbnail URL that will be rendered in the UI.
final
-
metadata
→ Map<
String, dynamic> ? -
Arbitrary metadata sent alongside analytics events.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - subtitle → String?
-
Optional supporting copy placed under the title.
final
- title → String
-
Headline shown on top of the banner artwork.
final
- type → String
-
Type of banner content (e.g., 'image', 'video', 'gif', etc.).
Defaults to 'image' if not specified.
final
Methods
-
copyWith(
{String? id, String? title, String? subtitle, String? description, String? imageUrl, String? type, UserInteraction? action, Map< String, dynamic> ? metadata, Map<String, dynamic> ? extensions}) → PromoBanner -
getExtension<
T> (String key) → T? -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited