TypeIdentifier class sealed

represents a type identifier consists of name and full library name

Available extensions
Annotations
  • @freezed

Constructors

TypeIdentifier({required String typeName, required String packageName, required String packageRelativeLibraryPath})
const
factory
TypeIdentifier.fromNameAndLibraryPath({required String typeName, required String? libraryPath})
factory

Properties

copyWith → $TypeIdentifierCopyWith<TypeIdentifier>
Create a copy of TypeIdentifier with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isDynamic → bool
returns true if this type identifier is the dynamic type
no setter
isNullable → bool
returns true if this type identifier contains the nullable flag
no setter
nonNullablePackageAndTypeName → String
returns a String containing the package name and the type name without nullable flag
no setter
nonNullableTypeName → String
returns the name without the nullable flag
no setter
nullableTypeName → String
returns the name with the nullable flag
no setter
packageAndTypeName → String
returns a String containing the package name and the type name
no setter
packageName → String
the name of the package defining that type
no setterinherited
packageRelativeLibraryPath → String
the library path inside the package defining that type
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
typeName → String
the name of this type
no setterinherited

Methods

asNonNullable() → TypeIdentifier
returns a copy of this type identifier without the nullable flag
asNullable() → TypeIdentifier
returns a copy of this type identifier with the nullable flag
map<TResult extends Object?>(TResult $default(_TypeIdentifier value)) → TResult

Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_TypeIdentifier value)?) → TResult?

Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_TypeIdentifier value)?, {required TResult orElse()}) → TResult

Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String typeName, String packageName, String packageRelativeLibraryPath)?, {required TResult orElse()}) → TResult

Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
when<TResult extends Object?>(TResult $default(String typeName, String packageName, String packageRelativeLibraryPath)) → TResult

Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String typeName, String packageName, String packageRelativeLibraryPath)?) → TResult?

Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension

A variant of when that fallback to returning null

Operators

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