NewsObj class
Detailed news content and metadata.
Constructors
-
NewsObj({String? oldHashId, String? hashId, String? authorName, String? content, String? sourceUrl, String? sourceName, String? title, bool? important, String? imageUrl, String? shortenedUrl, int? createdAt, int? score, List<
String> ? categoryNames, List<String> ? relevancyTags, String? tenant, String? fbObjectId, int? fbLikeCount, String? countryCode, List<String> ? targetedCity, String? bottomHeadline, String? bottomText, bool? darkerFonts, String? bottomPanelLink, String? bottomType, int? version, bool? dontShowAd, String? pollTenant, bool? videoOpinionEnabled, String? language, bool? showInshortsBrandName, bool? imageForRepresentation}) - Creates a NewsObj with all available parameters.
-
NewsObj.fromJson(Map<
String, dynamic> json) - Factory for creating NewsObj from a JSON map.
Properties
-
Name of the author.
getter/setter pair
- bottomHeadline ↔ String?
-
Headline shown at the bottom of the news card.
getter/setter pair
- bottomPanelLink ↔ String?
-
Link for the bottom panel.
getter/setter pair
- bottomText ↔ String?
-
Text shown at the bottom of the news card.
getter/setter pair
- bottomType ↔ String?
-
Type of bottom panel.
getter/setter pair
-
categoryNames
↔ List<
String> ? -
Categories this news belongs to.
getter/setter pair
- content ↔ String?
-
The actual news content/summary.
getter/setter pair
- countryCode ↔ String?
-
Country code for targeting.
getter/setter pair
- createdAt ↔ int?
-
Creation timestamp.
getter/setter pair
- darkerFonts ↔ bool?
-
Indicates if darker fonts should be used.
getter/setter pair
- dontShowAd ↔ bool?
-
Flag to hide ads for this news item.
getter/setter pair
- fbLikeCount ↔ int?
-
Number of likes on Facebook.
getter/setter pair
- fbObjectId ↔ String?
-
FB Object identifier.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hashId ↔ String?
-
Current hash ID unique to this news.
getter/setter pair
- imageForRepresentation ↔ bool?
-
Flag indicating if the image is for representation.
getter/setter pair
- imageUrl ↔ String?
-
Primary image URL for the news card.
getter/setter pair
- important ↔ bool?
-
Marks if the news is highlighted as important.
getter/setter pair
- language ↔ String?
-
Language of the news content.
getter/setter pair
- oldHashId ↔ String?
-
Previous hash ID associated with the news.
getter/setter pair
- pollTenant ↔ String?
-
Poll tenant information.
getter/setter pair
-
relevancyTags
↔ List<
String> ? -
Tags for relevancy and targeting.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- score ↔ int?
-
Internal score for sorting or relevancy.
getter/setter pair
- shortenedUrl ↔ String?
-
Shortened version of the source URL.
getter/setter pair
- showInshortsBrandName ↔ bool?
-
Flag to show InShorts branding.
getter/setter pair
- sourceName ↔ String?
-
Name of the news source (e.g., Times of India).
getter/setter pair
- sourceUrl ↔ String?
-
Original source URL of the news.
getter/setter pair
-
targetedCity
↔ List<
String> ? -
Targeted cities for the news.
getter/setter pair
- tenant ↔ String?
-
Platform tenant information.
getter/setter pair
- title ↔ String?
-
Headline or title of the news.
getter/setter pair
- version ↔ int?
-
Version of the news content.
getter/setter pair
- videoOpinionEnabled ↔ bool?
-
Indicates if video opinion is enabled.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts NewsObj to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited