Im learning to make android application with flutter and i seems to having problem with the emulator view that cut the display and it cannot go down any further.
My Code is this
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'LoginPage/login_screen.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
final Future<FirebaseApp> _initialization = Firebase.initializeApp();
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: _initialization,
builder: (context, snapshot)
{
if(snapshot.connectionState == ConnectionState.waiting)
{
return const MaterialApp(
home: Scaffold(
body: Center(
child: Text('Skolae Clone App is being initialized',
style: TextStyle(
color: Colors.cyan,
fontSize: 38,
fontWeight: FontWeight.bold,
fontFamily: 'signatra'
),
),
),
),
);
}
else if(snapshot.hasError)
{
return const MaterialApp(
home: Scaffold(
body: Center(
child: Text('An error has been occured',
style: TextStyle(
color: Colors.cyan,
fontSize: 40,
fontWeight: FontWeight.bold
),
),
),
),
);
}
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Skolae Clone App',
theme: ThemeData(
scaffoldBackgroundColor: Colors.black,
primarySwatch: Colors.blue,
),
home: Login(),
);
}
);
}
}
I don't know what should i add to fix this problem, i search for other similiar problems like im facing but their code is a bit different