Error when connect to firebase

when I try to connect to firebase I add this code to my main.dart

Future main() async {

WidgetsFlutterBinding.ensureInitialized();

await Firebase.initializeApp();

runApp(const MyApp());

}

my app run with white page and give this error

options != null
“FirebaseOptions cannot be null when creating the default app.”

can you advice please

I searched google , I found the best soluation to change my code to become like this

Future main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: FirebaseOptions(
apiKey: “XXX”, // Your apiKey
appId: “XXX”, // Your appId
messagingSenderId: “XXX”, // Your messagingSenderId
projectId: “XXX”, // Your projectId
),
);
runApp(const MyApp());
}

this is the only thing run my app very well