April 2020
Intermediate to advanced
380 pages
9h 24m
English
After making all the segments work properly, let's create the final material app. Inside the main.dart file, we create a StatelessWidget and override the build() method, as follows:
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: GenerateLiveCaption() ); }}
Finally, we execute the code as follows:
void main() => runApp(MyApp());
You should be able to have an app screen as shown in the following screenshot:

Notice the captions displayed in the image, as follows:
Read now
Unlock full access