import 'package:flutter/material.dart';
import 'pages/battery_health_page.dart';
import 'services/saf_storage_service.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // 🟢 初始化 SAF 服务
  await SafStorageService().init();

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '电池健康度',
      theme: ThemeData(
        fontFamily: 'HarmonyOS_Sans_SC',
        colorScheme: ColorScheme.fromSeed(
          seedColor: const Color.fromARGB(255, 255, 255, 255),
        ),
        useMaterial3: true,
      ),
      home: const BatteryHealthPage(),
      debugShowCheckedModeBanner: false,
    );
  }
}
