DriftView class

An annotation specifying view properties

Annotations
  • @Target({TargetKind.classType})

Constructors

DriftView({String? name, String? dataClassName, Type? extending})
Customize view name and data class name
const

Properties

dataClassName String?
The name for the data class that will be generated for the view class. The data class is a dart object that will be used to represent a result of the view. 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
extending Type?
The parent class of generated data class. Class must extends DataClass!
final
hashCode int
The hash code for this object.
no setterinherited
name String?
The sql view name to be used. By default, drift will use the snake_case representation of your class name as the sql view name. For instance, a View class named UserView will be called user_view by default.
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