import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:isekai_wiki/models/settings.dart'; import 'package:isekai_wiki/models/user.dart'; import 'models/model.dart'; import 'pages/tab_page.dart'; import 'styles.dart'; class IsekaiWikiApp extends StatelessWidget { const IsekaiWikiApp({super.key}); // This widget is the root of your application. @override Widget build(BuildContext context) { Get.put(UserController()); Get.put(AppSettingsController()); return Material( child: GetCupertinoApp( title: '异世界百科', theme: const CupertinoThemeData( textTheme: Styles.defaultTextTheme, scaffoldBackgroundColor: Styles.themePageBackgroundColor), localizationsDelegates: const >[ DefaultMaterialLocalizations.delegate, DefaultWidgetsLocalizations.delegate, DefaultCupertinoLocalizations.delegate, ], initialBinding: InitialBinding(), home: const IsekaiWikiTabsPage(), builder: (context, child) { if (child == null) { return Container(); } else { Styles.textScaleFactor = MediaQuery.of(context).textScaleFactor; Styles.isXs = MediaQuery.of(context).size.width <= 340; return child; } }, debugShowCheckedModeBanner: false, ), ); } }