import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'helpers/filament_repository.dart';
import 'helpers/sample_bindings.dart';
import 'helpers/sample_routes.dart';
import 'pages/home_view.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Get.putAsync(() => FilamentRepository().init());
  runApp(MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(colorScheme: .fromSeed(seedColor: Colors.deepPurple)),
      initialBinding: SampleBindings(),
      initialRoute: HomePage.namedRoute,
      getPages: SampleRouts.samplePages,
    );
  }
}
