Issue help me, I’m still stuck here for the past few days. why is it like this? error indicates there is an error in "dashboard_bottom_nav" and when I try to click the error it directs me to this class and
Continue readingDart null safety doesn't work with class fields
Issue I have migrated my Dart code to NNBD / Null Safety. Some of it looks like this: class Foo { String? _a; void foo() { if (_a != null) { _a += ‘a’; } } } class Bar {
Continue readingNon-nullable instance field '_selectedSize' must be initialized
Issue I have been working with my Store App, but this null safety is getting me pissed now. I have created a class but it gives me this error with later doesn’t allow my app to work correctly this is
Continue readingdart migrate gives error in my own code files
Issue When I run "dart migrate" for enabling null-safety, it gives me following output. Before migrating your package, we recommend ensuring that every library it imports (either directly or indirectly) has been migrated to null safety, so that you will
Continue readingUnable to save the data in model from firestore after migrating to null safety
Issue So, I have a user model where i want to store the value from the document present in firestore and for that i have the following code:- import ‘package:cloud_firestore/cloud_firestore.dart’; class UserModel { final String? id; final String? username; final
Continue readingThe return type 'Future<bool?> Function()' isn't a 'Future<bool>', as required by the closure's context
Issue I have upgraded my project sdk to >2.12 so I am making the changes and I am stuck at this particular error and not able to find any solution for it. I have made changes in the method as
Continue readingDart Null Safety: The method '[]' can't be unconditionally invoked because the receiver can be 'null'
Issue I have got the following Text( … ) widget in my Flutter application Text( data[‘location’], style: TextStyle( fontSize: 40, letterSpacing: 2, color: Colors.white ) However, it keeps showing me an error that the data[‘location’] cannot be accessed, as it
Continue readingLet TextEditingController be null in null_safety
Issue I have converted my project to null-safety Dart 2. I have been working through issues since the conversion. Right now, I need to change this line clientFNameController.text = widget.trxns![‘clientFName’]; so that clientFNameController.text = null; This is the line where
Continue readinglists in null safety issue
Issue i’m getting a null safety issue about with a list from models The default ‘List’ constructor isn’t available when null safety is enabled.Try using a list literal, ‘List.filled’ or ‘List.generate’. this is the code: var productList = List<Product>().obs; modal
Continue readingflutter 2.2 update code stopped working and no emulator in some projects
Issue I formatted my laptop lately and all projects stopped, in the main method the first class, I have these errors class MyApp extends StatefulWidget { static void setLocale(BuildContext context, Locale locale) { _MyAppState state = context.findAncestorStateOfType<_MyAppState>(); state.setLocale(locale); } @override
Continue reading