UserModel constructor
const
UserModel({})
Creates a new instance of the UserModel
class.
The id
, name
, and email
parameters are required and represent the user information.
The role
and image
parameters are optional.
Implementation
const UserModel({
required int id,
required String name,
required String email,
String? role,
String? image,
}) : super(
id: id,
name: name,
email: email,
role: role,
image: image,
);