0

Unable to fetch list of collections in appwrite using database.listCollections(). It always returns null.

E/flutter (12082): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'int'
E/flutter (12082): #0      new CollectionList.fromMap
package:dart_appwrite/…/models/collection_list.dart:18
E/flutter (12082): #1      Database.listCollections

Unable to find the solution anywhere. My Appwrite instance is self hosted on aws ec2. Able to create collections and documents but unable to get list of collections.

aravindha
  • 1
  • 1

1 Answers1

0

Fetching Collections is typically a server side operation and not done client side (like in a Flutter app). This could be why you're getting this type of error in your app.

Otherwise, more information about what version of Appwrite you're on, what version of the Appwrite Dart SDK you're on, and a snippet of your code would be helpful.

Steven Nguyen
  • 452
  • 4
  • 4