User class

Available extensions
Annotations

Constructors

User({required String id, required String name, @Default(18) int age = 18, List<String> tags = const [], required Set<int> scores, Map<String, String> metadata = const {'role' : 'user'}, Set<String> tagsSet = const {'a', 'b'}, Map<String, int> stats = const {'count' : 1}})

Properties

age → int
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
metadata → Map<String, String>
final
name → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scores → Set<int>
final
stats → Map<String, int>
final
tags → List<String>
final
tagsSet → Set<String>
final

Methods

copyWith({String? id, String? name, int? age, List<String>? tags, Set<int>? scores, Map<String, String>? metadata, Set<String>? tagsSet, Map<String, int>? stats}) → User

Available on User, provided by the UserJsonExtension extension

getId() → Object?

Available on User, provided by the UserJsonExtension extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>

Available on User, provided by the UserJsonExtension extension

toString() → String
A string representation of this object.
inherited

Operators

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