DataClassName class

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 view name followed by "Data" when naming data classes (e.g. a view named "UserView" will generate a data class called "UserViewData").

Annotations
  • @Target({TargetKind.classType})

Constructors

DataClassName.new(String? name, {Type? extending, List<Type>? implementing, String? companion})
Customize the data class name for a given table. By default, drift will attempt to use the view name followed by "Data" when naming data classes (e.g. a view named "UserView" will generate a data class called "UserViewData").
const
DataClassName.custom({String? name, Type? extending, List<Type>? implementing, String? companion})
Customize the data class name for a given table. By default, drift will attempt to use the view name followed by "Data" when naming data classes (e.g. a view named "UserView" will generate a data class called "UserViewData").
const

Properties

companion String?
The overridden name to use when generating the companion class for a table.
final
extending Type?
The parent type of the data class generated by drift.
final
hashCode int
The hash code for this object.
no setterinherited
implementing List<Type>?
A list of classes that the drift-generated row class should implement.
final
name String?
The overridden name to use when generating the data class for a table. By default, drift will attempt to use the view name followed by "Data" when naming data classes (e.g. a view named "UserView" will generate a data class called "UserViewData").
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
toString() String
A string representation of this object.
inherited

Operators

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