38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:shadcn_ui/shadcn_ui.dart';
|
|
|
|
import '../routing/app_router.dart';
|
|
import '../theme/app_theme.dart';
|
|
import '../theme/yanting_text.dart';
|
|
import '../theme/yanting_shad_theme.dart';
|
|
|
|
class ReportNotebooklmApp extends ConsumerWidget {
|
|
const ReportNotebooklmApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final router = ref.watch(routerProvider);
|
|
final dmSansStyle = GoogleFonts.dmSans().copyWith(
|
|
fontFamilyFallback: YantingText.fontFallback,
|
|
);
|
|
|
|
return ShadApp.router(
|
|
title: '研听',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: buildYantingShadTheme(),
|
|
darkTheme: buildYantingDarkShadTheme(),
|
|
routerConfig: router,
|
|
scrollBehavior: const ShadScrollBehavior(),
|
|
materialThemeBuilder: (context, theme) => buildAppTheme(),
|
|
builder: (context, child) {
|
|
return DefaultTextStyle.merge(
|
|
style: TextStyle(fontFamilyFallback: dmSansStyle.fontFamilyFallback),
|
|
child: child ?? const SizedBox.shrink(),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|