Im trying to revize an old basic shopping app with firebase but its old version code and couldnt get the null safety exactly. Could anyone help me. Here i get "non-nullable instance field '_selectedParam' must be initialized" also for 'database' i get the same error. For 'List's i get "The default 'List' constructor isn't available when null safety is enabled." error.
class MyApp extends StatefulWidget {
MyApp(this.k);
final int k;
@override
_MyAppState createState() => _MyAppState(k);
}
class _MyAppState extends State<MyApp> {
CollectionReference games= FirebaseFirestore.instance.collection("games");
_MyAppState(this.k);
final int k ;
static Future<Database> database ;
var receivePort = ReceivePort();
Isolate _isolate;
final String url = "https://www.freetogame.com/api/games";
List data ;
static List listpvp= new List(); static List listmmorpg= new List(); static List listmmofps= new List(); static List listshooter = new List();
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin();
String _selectedParam;
int val;
String task;
static String _col="mmofps"; //initially