Flutter Developer
When I create a document everything works fine. But when I load a model, then I get the following error: "type String is not a sub type of int" which totaly make sense. But in the lib the code is like the following:
/// Document automatically incrementing ID.
final int $sequence;
factory Document.fromMap(Map<String, dynamic> map) {
return Document(
$id: map['$id'].toString(),
$sequence: map['$sequence'],
$collectionId: map['$collectionId'].toString(),
$databaseId: map['$databaseId'].toString(),
$createdAt: map['$createdAt'].toString(),
$updatedAt: map['$updatedAt'].toString(),
$permissions: List.from(map['$permissions'] ?? []),
data: map,
);
and is receives map['$sequence'], as "1" for example. So it is a String and is cannot converted to an in on the fromMap method.