Answers for "using main function before runApp flutter"

0

using main function before runApp flutter

import 'package:flutter/material.dart';

main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() {
    return new MyAppState();
  }
}

class MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Container()
      ),
    );
  }
}
Posted by: Guest on January-21-2022

Browse Popular Code Answers by Language