I migrated my code to null safety but now I get an issue: When I want to fetch a document from firestore I get this error:
Error: The operator '[]' isn't defined for the class 'Object'.
Here is the code snippet where I want to call ['plans'] on the snapshot data.
body: FutureBuilder(
future: handler.getPlans(),
builder: (context, snapshot) {
if (snapshot.hasData) {
final plans = snapshot.data!['plans']; /// here I cant call ['plans']
Before null safety this worked. Whats the issue?