Android studio bug fix

Viewed 20

im got a problem when i want to open the product to know details.when i want to touch the product,it said like this in android studio:

The following NoSuchMethodError was thrown building FutureBuilder(dirty, state: _FutureBuilderState#8a17d): The method '[]' was called on null. Receiver: null Tried calling:

The relevant error-causing widget was: FutureBuilder FutureBuilder:file:///E:/vscode/ecommerce/lib/screens/product_page.dart:43:11

FutureBuilder(
            future: _firebaseServices.productsRef.doc(widget.productId).get(),
            builder: (context, snapshot) {
              if (snapshot.hasError) {
                return Scaffold(
                  body: Center(
                    child: Text("Error: ${snapshot.error}"),
                  ),
                );
              }

and when i run the application, in android studio the whole code runs and there is no error at all

0 Answers
Related