GetDutchie / brick

An intuitive way to work with persistent data in Dart

Home Page:https://getdutchie.github.io/brick/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supported types are null, byte[], double, long, boolean and String)

hortigado opened this issue · comments

Hello, I get the following error and I can't find the problem, I thought it was because of the roles list. But when deleting the variable it still gives me the error. Any idea how to fix it. Thank you

image

class MembershipLocal extends OfflineFirstWithRestModel {
  /// List of teams.

  /// Membership ID.
  @Sqlite(unique: true)
  @Rest(
    name: '\\\$id',
    ignoreTo: true,
  )
  final String id;

  @Rest(
    name: '\\\$createdAt',
  )
  String createdAt;

  @Rest(
    name: '\\\$updatedAt',
  )
  String updatedAt;

  /// User ID.
  String userId;

  ///User name.
  String userName;

  /// User email address.
  String userEmail;

  /// Team ID.
  String teamId;

  /// Team name.
  String teamName;

  /// Date, the user has been invited to join the team in ISO 8601 format.
  String invited;

  /// Date, the user has accepted the invitation to join the team in ISO 8601 format.
  String joined;

  /// User confirmation status, true if the user has joined the team or false otherwise.
  bool confirm;

  /// User list of roles

  List<String> roles;

  MembershipLocal({
    required this.id,
    required this.createdAt,
    required this.updatedAt,
    required this.userId,
    required this.userName,
    required this.userEmail,
    required this.teamId,
    required this.teamName,
    required this.invited,
    required this.joined,
    required this.confirm,
    required this.roles,
  });

Silly mistake on my part I was applying where("id") in offlinefirst when it throws me the whole array