UserModel constructor

const UserModel({
  1. required int id,
  2. required String name,
  3. required String email,
  4. String? role,
  5. String? image,
})

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,
      );