import 'package:flutter/material.dart'; import 'package:gamer_updater/db.dart'; import 'package:gamer_updater/game.dart'; void main() async { await DB.init(); var game = Game( name: 'Rimworld', versionRegex: r'(\d+\.\d+\.\d+)', lastPlayed: '1.4.3704', rssFeedUrl: 'https://store.steampowered.com/feeds/news/app/294100/?cc=HR&l=english', ); await game.updateActualVersion(); await GameRepository.upsert(game); runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Gamer Updater', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), ), darkTheme: ThemeData( brightness: Brightness.dark, useMaterial3: true, scaffoldBackgroundColor: Colors.black, colorSchemeSeed: Colors.black, highlightColor: Colors.deepPurple, textTheme: TextTheme( bodyLarge: TextStyle(fontSize: 22, fontWeight: FontWeight.bold), bodyMedium: TextStyle(fontSize: 20), bodySmall: TextStyle(fontSize: 16), ), ), themeMode: ThemeMode.system, home: const MyHomePage(title: 'Gamer Updater'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title}); final String title; @override State createState() => _MyHomePageState(); } class _MyHomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [const Text('Hello cyka')], ), ), ); } }