flutter-provider

The method '[ ]' was called on null

天涯浪子 提交于 2019-11-26 18:39:34
问题 I am running my app and getting the error: "NoSuchMethodError: The Method '[ ]' was called on null. Receiver: null. Tried calling: ." This is also happening for "photourl" and "total questions", all three fields that I have in my firestore database. This error is occurring after I implemented provider, so I am not sure if this is a result of this. My code is below: void main() { runApp( ChangeNotifierProvider( builder: (context) => UserModel(), child: MyApp(), ), ); } class MyApp extends