CountriesModel class

A model representing a country.

Constructors

CountriesModel.new({required String id, required String name, required String flag, required String code, required String dialCode, required String pattern, required int limit, String? phoneNumber})
Constructor for creating a CountriesModel instance.
CountriesModel.fromJson(Map<String, dynamic> json)
Creates a CountriesModel instance from a JSON map.
factory

Properties

code String
The code of the country (e.g., US for the United States).
final
dialCode String
The international dialing code of the country.
final
flag String
The flag emoji of the country.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifier of the country.
final
limit int
The limit on the length of the phone number.
final
name String
The name of the country.
final
pattern String
The phone number pattern for the country.
final
phoneNumber String?
An optional phone number associated with the country.
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
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

defaultCountry CountriesModel
A static method to get a default country model.
no setter