android – AppwriteRealtime: Permit self-signed certificates , subscription: null


I had an issue with Actual Time messages in Appwrite with Flutter, the subcription was null, however I believe all setups had been true as a result of I’ve used a likewise code for an additional a part of my challenge
right here is my code:


  @override
  Widget construct(BuildContext context, WidgetRef ref) {
    UserModel copyOfUser = userModel;

    return Scaffold(
      physique: ref.watch(getLatestUserProfileDataProvider).when(
            information: (information) {
              if (information.occasions.accommodates(
                'databases.*.collections.${AppWriteConstants.usersCollection}.paperwork.${copyOfUser.uid}.replace',
              )) {
                copyOfUser = UserModel.fromMap(information.payload);
              }
              return UserProfile(consumer: copyOfUser);
            },
            error: (error, st) => ErrorText(
              error: error.toString(),
            ),
            loading: () {
              return UserProfile(consumer: copyOfUser);
            },
          ),
    );
  }
ultimate getLatestUserProfileDataProvider = StreamProvider((ref) {
  ultimate userAPI = ref.watch(userAPIProvider);
  return userAPI.getLatestUserProfileData();
});


  @override
  Stream<RealtimeMessage> getLatestUserProfileData() {
    return _realtime.subscribe([
      'databases.${AppWriteConstants.databaseId}.collections.${AppWriteConstants.usersCollection}.documents'
    ]).stream;
  }


Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles