DataClassName class Null safety

A class to be used as an annotation on Table classes to customize the name for the data class that will be generated for the table class. The data class is a dart object that will be used to represent a row in the table.

By default, drift will attempt to use the singular form of the table name when naming data classes (e.g. a table named "Users" will generate a data class called "User"). However, this doesn't work for irregular plurals and you might want to choose a different name, for which this annotation can be used.

Annotations
  • @Target({TargetKind.classType})

Constructors

DataClassName(String name)
Customize the data class name for a given table. By default, drift will attempt to use the singular form of the table name when naming data classes (e.g. a table named "Users" will generate a data class called "User"). However, this doesn't work for irregular plurals and you might want to choose a different name, for which this annotation can be used.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
name String
The overridden name to use when generating the data class for a table. By default, drift will attempt to use the singular form of the table name when naming data classes (e.g. a table named "Users" will generate a data class called "User"). However, this doesn't work for irregular plurals and you might want to choose a different name, for which this annotation can be used.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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