47 lines
1.6 KiB
Dart
47 lines
1.6 KiB
Dart
import 'package:aesthetica_wallpaper/screens/home/gallery_screen.dart';
|
|
import 'package:aesthetica_wallpaper/screens/editor/editor_screen.dart';
|
|
import 'package:aesthetica_wallpaper/screens/recipe/recipe_screen.dart';
|
|
import 'package:aesthetica_wallpaper/widgets/main_screen.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'home_start_page.dart';
|
|
|
|
class AestheticaApp extends StatelessWidget {
|
|
final NavigatorObserver analyObserver;
|
|
const AestheticaApp({super.key,required this.analyObserver});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'MoodCanvas:Walls',
|
|
navigatorObservers: [analyObserver],
|
|
// App 主题,设置为深色模式
|
|
theme: ThemeData(
|
|
brightness: Brightness.dark,
|
|
primaryColor: Colors.blueGrey[900],
|
|
scaffoldBackgroundColor: Colors.black,
|
|
fontFamily: 'Lato',
|
|
appBarTheme: AppBarTheme(
|
|
backgroundColor: Colors.grey[900],
|
|
elevation: 0,
|
|
),
|
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
|
backgroundColor: Colors.black,
|
|
selectedItemColor: Colors.pinkAccent,
|
|
unselectedItemColor: Colors.grey[600],
|
|
type: BottomNavigationBarType.fixed,
|
|
),
|
|
),
|
|
debugShowCheckedModeBanner: false,
|
|
// App 路由
|
|
initialRoute: '/',
|
|
routes: {
|
|
'/': (context) => HomeStartPage(),
|
|
'/gallery': (context) => const GalleryScreen(),
|
|
'/editor': (context) => const EditorScreen(),
|
|
'/recipes': (context) => const RecipeScreen(),
|
|
},
|
|
);
|
|
}
|
|
}
|