import 'package:flutter/material.dart';
import 'package:surface_tension_calculator/routes/route_generator.dart';
import 'package:surface_tension_calculator/routes/routes.dart';
import 'package:surface_tension_calculator/utils/snackbar_utils.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      scaffoldMessengerKey: SnackBarUtils.scaffoldKey,
      title: 'Surface Tension Calculator',
      theme: ThemeData(
        fontFamily: 'Montserrat',
        useMaterial3: true,
        appBarTheme: const AppBarTheme(
          centerTitle: true,
          iconTheme: IconThemeData(color: Colors.white),
          elevation: 0,
        ),
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      initialRoute: MainUIRoutes.homeScreen,
      onGenerateRoute: RouteGenerator.generateRoute,
    );
  }
}
