Field '_areas' should be initialized because its type 'List<Area>' doesn't allow null

Flutter shows error Non-nullable instance field ‘_areas’ must be initialized. Maybe this is because of not defining null in lists areas what when defining null Like List? _areas; it shows an error on the index Error: Field ‘_areas’ should be initialized because its type ‘List’ doesn’t allow null. Error Line: List _areas; Here is my… Read More Field '_areas' should be initialized because its type 'List<Area>' doesn't allow null

Argument of type 'string' is not assignable to parameter of type 'Pick<IJobs, "name">'

Why I get this error? Argument of type ‘string’ is not assignable to parameter of type ‘Pick<IJobs, "name">’. Type ‘string’ is not assignable to type ‘Pick<IJobs, "name">’ mockData: export const Jobs: IJobs[] = [ { id: ‘1’, name: ‘Trader’, available: true }, { id: ‘2’, name: ‘Seller’, available: true }, { id: ‘3’, name: ‘Manager’,… Read More Argument of type 'string' is not assignable to parameter of type 'Pick<IJobs, "name">'

Why is ElevatedButton getting stretched and becoming a background?

I’m new on flutter and I don’t have an idea why ElevatedButton stretched and become a background. I just want a simple button. How can I solve this problem? Here’s the image below: Here’s my code @override Widget build(BuildContext context) { return Scaffold( body: Center( child: ElevatedButton( onPressed: () { Navigator.pop(context); }, child: SafeArea( child:… Read More Why is ElevatedButton getting stretched and becoming a background?

Why does this code display a blank screen when running?

Before displaying the code, here are the things that I checked to avoid similar answers : android:extratNativeLibs="true" Jsonfile firebase connected routegenerator and initialroute checked in the main file and generatorfile .I like to avoid mediaQuery and work with percentages, that is why I use FractionallySizedBox. Here is the code of the initial route : import… Read More Why does this code display a blank screen when running?

Undefined is not an object (evaluating 'navigation.navigate') when trying to navigate between two sites React Native

I try to navigate between two pages in a React Native app. I keep getting errors for my implementations but I don’t know why. I have the following setup for a "Home" and "Settings" site in the React Native app with Navigator adjusted from the documentation: App.js import Home from "./Home"; import { NavigationContainer }… Read More Undefined is not an object (evaluating 'navigation.navigate') when trying to navigate between two sites React Native