User class

Example 1: User with Additional Properties Shows how to store flexible user preferences

Annotations
  • @AckModel.new(description: 'User with flexible preferences', additionalProperties: true, additionalPropertiesField: 'preferences')

Constructors

User({required String id, required String name, required String email, Map<String, dynamic> preferences = const {}})

Properties

email String
final
hashCode int
The hash code for this object.
no setterinherited
id String
final
name String
final
preferences Map<String, dynamic>
This field stores all extra properties like theme, language, etc.
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