IndianState class
Represents an Indian state with associated details.
Constructors
-
IndianState({required String name, required String code, required String capital, required String population, required String image, required List<
City> cities, required String area}) - Constructs an IndianState object.
-
IndianState.fromMap(Map<
String, dynamic> map) -
Factory method to create an IndianState object from a Map.
factory
Properties
- area → String
-
List of area in sq km of state.
final
- capital → String
-
Capital city of the state.
final
-
cities
→ List<
City> -
List of cities within the state.
final
- code → String
-
Code representing the state (e.g., state abbreviation).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → String
-
Image URL or path representing the state.
final
- name → String
-
Name of the state.
final
- population → String
-
Population of the state as a string.
final
- 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
-
toMap(
) → Map< String, dynamic> - Converts the IndianState object into a Map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited