skip to Main Content

future: FirebaseAuth.instance.currentUser(), throws an error, need alternatives – Flutter

I have seen various questions about the same topic, and realized that 'currentUser' does not go with future after the update in FirebaseAuth import 'package:flutter/material.dart'; import 'package:firebase_auth/firebase_auth.dart'; class HomePage extends StatefulWidget { @override _HomePageState createState() => _HomePageState(); } class _HomePageState…

VIEW QUESTION

Flutter firestore database returns null

I have following code: I use cloud firestore as database UserModel: class DbUser { String id; final String authUserID; final String userName; final List<String>? itemsForSale; final List<String>? itemFavourites; final List<String>? bids; DbUser( {this.id = '', required this.authUserID, required this.userName, this.itemsForSale,…

VIEW QUESTION

Bad condition – Cubit – Flutter

I'm trying to get to the RegistrationSendCode screen. But unfortunately I am getting a bad status error. Here is my provider and builder - Provider - class RegistrationSendCode extends StatelessWidget{ @override Widget build(BuildContext context){ return BlocProvider<RegistrationSendCodeCubit>( create: (context) => RegistrationSendCodeCubit(),…

VIEW QUESTION
Back To Top
Search