WidgetData class

Domain entity representing widget data.

Contains all the data fields that can be displayed in a widget:

  • Title and subtitle text
  • Body content
  • Image URL and icon name
  • Custom data map
  • Timestamp for time-based content

Constructors

WidgetData({String? title, String? subtitle, String? body, String? imageUrl, String? iconName, Map<String, dynamic>? customData, DateTime? timestamp})
Creates a new WidgetData instance.
const
WidgetData.fromJson(Map<String, dynamic> json)
Creates a WidgetData from a JSON map.
factory

Properties

body String?
The body content text.
final
customData Map<String, dynamic>?
Custom data map for additional information.
final
hashCode int
The hash code for this object.
no setterinherited
iconName String?
Name of a system icon to display.
final
imageUrl String?
URL for an image to display.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtitle String?
The subtitle text.
final
timestamp DateTime?
Timestamp for time-based content.
final
title String?
The main title text.
final

Methods

copyWith({String? title, String? subtitle, String? body, String? imageUrl, String? iconName, Map<String, dynamic>? customData, DateTime? timestamp}) WidgetData
Creates a copy of this WidgetData with updated fields.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this WidgetData to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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