Data class

Contains the list of news items and status information.

Constructors

Data({List<News>? newsList, String? message})
Creates a Data object.
Data.fromJson(Map<String, dynamic> json)
Factory for creating Data from a JSON map.

Properties

hashCode int
The hash code for this object.
no setterinherited
message String?
Additional status message.
getter/setter pair
newsList List<News>?
List of news articles fetched from the API.
getter/setter pair
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() Map<String, dynamic>
Converts Data to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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