Column class
This annotation is used for when you want to change default name of column name of a field in table or when you want to set default value for column. You have to know that the default column name is property name.
@Entity()
class Note {
@PrimaryKey(autoGenerate: true)
final int? id;
final String text;
@Column(name: 'edited')
final bool isEdited;
@Column(name: 'test', defaultValue: '1')
final int? test;
Note({
this.id,
required this.text,
required this.isEdited,
this.test,
});
}
Properties
- defaultValue → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
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
Static Properties
- fields ↔ _ColumnFields
-
getter/setter pair