Constants class

This class provides utilities for handling sqflite data types when creating models.

  • For variable character length, use the varchar map. Specify the length as a string key.

    • Example: Constants.varchar['10'] will output 'VARCHAR(10)'.
  • For decimal numbers, use the decimal map. Specify the precision and scale as a string key in the format 'p,s'.

    • Example: Constants.decimal['9,2'] will output 'DECIMAL(9,2)'.
  • For data types that are always the same, use the corresponding constant value.

    • Example: Constants.integer will output 'INTEGER'.
  • For custom data types, use the custom map. You can add any custom data types you want.

Constructors

Constants()

Properties

hashCode int
The hash code for this object.
no setterinherited
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

custom Map<String, String>
getter/setter pair
decimal Map<String, String>
getter/setter pair
varchar Map<String, String>
getter/setter pair

Constants

bigint → const String
boolean → const String
coma → const String
datetime → const String
integer → const String
text → const String