This class defines a list of users, and also overrides the get props method to return the list of users.

    import 'package:equatable/equatable.dart';
    import '../../models/User.dart';
    class UserState extends Equatable {
      final List<User> allUsers;
      const UserState(
      {this.allUsers = const <User>[],});
      List<Object> get props => [allUsers];
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.