GenerateDartModel class
Generated class for _GenerateDartModel
.
- Inheritance
- Available extensions
Constructors
- GenerateDartModel({String? className, Set? fields, bool? shouldInherit, String? inheritanceConstructor, String? keyStringCase, String? description})
-
Constructs a new instance of GenerateDartModel
from optional and required parameters.
const
- GenerateDartModel.assertRequired({String? className, Set? fields, bool? shouldInherit, String? inheritanceConstructor, String? keyStringCase, String? description})
-
Constructs a new instance of GenerateDartModel,
and asserts that all required parameters are not null.
factory
- GenerateDartModel.from(BaseModel another)
-
Constructs a new instance of GenerateDartModel,
from the fields of
another
instance. Throws if the conversion fails.factory -
GenerateDartModel.fromJson(Map<
String, dynamic> ? json) -
Constructs a new instance of GenerateDartModel,
from
json
, which must be a valid JSON object. Throws if the conversion fails.factory - GenerateDartModel.fromJsonString(String jsonString)
-
Constructs a new instance of GenerateDartModel,
from
jsonString
, which must be a valid JSON String. Throws if the conversion fails.factory - GenerateDartModel.fromUri(Uri? uri)
-
Constructs a new instance of GenerateDartModel,
from the query parameters of
uri
. Throws if the conversion fails.factory - GenerateDartModel.of(GenerateDartModel another)
-
Constructs a new instance of GenerateDartModel,
from the fields of
another
instance. Throws if the conversion fails.factory - GenerateDartModel.optional({String? className, Set? fields, bool? shouldInherit, String? inheritanceConstructor, String? keyStringCase, String? description})
-
Construcs a new instance of GenerateDartModel,
forcing all parameters to be optional.
const
Properties
- $className → String
-
The runtime type of this class as a String.
no setteroverride
- className → String?
-
The class name to be used. If left null, the name is derived from the annotated class.
final
- className$ → String?
-
Returns the value of the className field.
If the field is nullable, the return value may be null; otherwise, it
will always return a non-null value.
no setter
- description → String?
-
A comment describing the generated class.
final
- description$ → String?
-
Returns the value of the description field.
If the field is nullable, the return value may be null; otherwise, it
will always return a non-null value.
no setter
- fields → Set?
-
A collection of fields, represented as Field instances, to be generated for the class.
final
- fields$ → Set?
-
Returns the value of the fields field.
If the field is nullable, the return value may be null; otherwise, it
will always return a non-null value.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- inheritanceConstructor → String?
-
The constructor from the superclass to use, if a custom one is required.
final
- inheritanceConstructor$ → String?
-
Returns the value of the inheritanceConstructor field.
If the field is nullable, the return value may be null; otherwise, it
will always return a non-null value.
no setter
- keyStringCase → String?
-
Specifies the case format for the keys, with "CAMEL_CASE" as the default.
final
- keyStringCase$ → String?
-
Returns the value of the keyStringCase field.
If the field is nullable, the return value may be null; otherwise, it
will always return a non-null value.
no setter
-
rootData
→ Map<
String, dynamic> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldInherit → bool?
-
Determines whether the annotated class should be inherited by the generated class.
final
- shouldInherit$ → bool?
-
Returns the value of the shouldInherit field.
If the field is nullable, the return value may be null; otherwise, it
will always return a non-null value.
no setter
Methods
-
copyWith(
{String? className, Set? fields, bool? shouldInherit, String? inheritanceConstructor, String? keyStringCase, String? description}) → GenerateDartModel -
Available on GenerateDartModel, provided by the GenerateDartModelX extension
Creates a copy of this instance, replacing the specified fields. -
copyWithout(
{bool className = true, bool fields = true, bool shouldInherit = true, bool inheritanceConstructor = true, bool keyStringCase = true, bool description = true}) → GenerateDartModel -
Available on GenerateDartModel, provided by the GenerateDartModelX extension
Creates a copy of this instance, removing the specified fields. -
equals(
dynamic other) → bool -
Compares the BaseModel with another BaseModel using the
DeepCollectionEquality
and returnstrue
if they are equal.inherited -
mergeWith(
BaseModel? other, {bool deepMerge = false}) → GenerateDartModel -
Available on GenerateDartModel, provided by the GenerateDartModelX extension
Creates a copy of this instance, merging another model's fields into this model's fields. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sortedJson(
{bool includeNulls = false}) → Map< String, dynamic> -
Returns a Json i.e.
Map<String, dynamic>
representation of the BaseModel, with the keys sorted alphabetically.inherited -
toJson(
{bool includeNulls = false}) → Map< String, dynamic> -
Returns a Json i.e.
Map<String, dynamic>
representation of the BaseModel.override -
toJsonString(
) → String -
Returns a JSON string representation of the BaseModel.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toUrl(
) → Uri -
Converts the current BaseModel to a Uri that can be used as a
distinct identifier. The model must not be too large to avoid exceeding
the maximum length of a URL.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJsonOrNull(
Map< String, dynamic> ? json) → GenerateDartModel? -
Constructs a new instance of GenerateDartModel,
from
json
, which must be a valid JSON object. Returnsnull
ifjson
isnull
or if the conversion fails. -
fromJsonStringOrNull(
String? jsonString) → GenerateDartModel? -
Constructs a new instance of GenerateDartModel,
from
jsonString
, which must be a valid JSON String. Returnsnull
ifjsonString
isnull
or if the conversion fails.override -
fromOrNull(
BaseModel? another) → GenerateDartModel? -
Constructs a new instance of GenerateDartModel,
from the fields of
another
instance. Returnsnull
ifanother
isnull
or if the conversion fails. -
fromUriOrNull(
Uri? uri) → GenerateDartModel? -
Constructs a new instance of GenerateDartModel,
from the query parameters of
uri
. Returnsnull
ifuri
isnull
or if the conversion fails. -
ofOrNull(
GenerateDartModel? other) → GenerateDartModel? -
Constructs a new instance of GenerateDartModel,
from the fields of
another
instance. Returnsnull
ifanother
isnull
or if the conversion fails.
Constants
- CLASS_NAME → const String
- The runtime type of this class as a String.