import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:input_kwh/dashboard.dart';
import 'package:input_kwh/login.dart';
import 'package:input_kwh/registrasi.dart';
import 'firebase_options.dart';

import 'home_view.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        initialRoute: '/',
        routes: {
          '/': (context) => Home(),
          '/login': (context) => Login(),
          '/registrasi': (context) => RegistrationScreen(),
          '/dashboard': (context) => Dashboard(),
        });
  }
}
