Categories class Null safety
Model class that represents the categories from the API.
Constructors
-
Categories({List<
TriviaCategories> ? triviaCategories}) -
Categories.fromJson(Map<
String, dynamic> json)
Properties
- hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
triviaCategories
↔ List<
TriviaCategories> ? -
List of the categories.
read / write
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fetchCategories(
) → Future< Categories> - API call to get the categories.
-
fetchCategoriesLocal(
) → dynamic - Local call to get the categories.