[dart] s

Viewer

  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_contact_app/add_form.dart';
  3. import 'package:flutter_contact_app/home_screen.dart';
  4. import 'package:flutter_contact_app/splash_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.       title: 'ContactMe',
  15.       theme: ThemeData(
  16.         primarySwatch: Colors.blueGrey,
  17.       ),
  18.       debugShowCheckedModeBanner: false,
  19.       initialRoute: '/',
  20.       home: SplashScreen(), // Menggunakan SplashScreen sebagai halaman awal
  21.       routes: {
  22.         '/': (context) => HomeScreen(),
  23.         '/addForm': (context) => AddForm(),
  24.       },
  25.     );
  26.   }
  27. }

Editor

You can edit this paste and save as new:


File Description
  • s
  • Paste Code
  • 10 Dec-2023
  • 745 Bytes
You can Share it: