[dart] main

Viewer

  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_contact_app/splash_screen.dart';
  3. import 'package:flutter_contact_app/add_form.dart';
  4. import 'package:flutter_contact_app/home_screen.dart';
  5.  
  6. void main() {
  7.   runApp(MyApp());
  8. }
  9.  
  10. class MyApp extends StatelessWidget {
  11.   @override
  12.   Widget build(BuildContext context) {
  13.     return MaterialApp(
  14.       debugShowCheckedModeBanner: false,
  15.       initialRoute: '/splash',
  16.       routes: {
  17.         '/splash': (context) => SplashScreen(),
  18.         '/home': (context) => HomeScreen(),
  19.         '/addForm': (context) => AddForm(),
  20.       },
  21.     );
  22.   }
  23. }
  24.  

Editor

You can edit this paste and save as new:


File Description
  • main
  • Paste Code
  • 10 Dec-2023
  • 623 Bytes
You can Share it: