April 2020
Intermediate to advanced
380 pages
9h 24m
English
At last, we create the final MaterialApp. We create the main.dart file, which provides the point of execution for the whole code. We create a stateless widget called FaceDetectorApp, which is used to return a MaterialApp specifying the title, theme, and home screen:
class FaceDetectorApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( debugShowCheckedModeBanner: false, title: 'Flutter Demo', theme: new ThemeData( primarySwatch: Colors.blue, ), home: new FaceDetectorHome(), ); }}
Now we define the main() method to execute the whole application by passing in the instance of FaceDetectorApp() as follows:
void main() => runApp(new FaceDetectorApp());
Read now
Unlock full access