Bundles several in-progress changes from the working tree: - App appearance / look-and-feel: customizable app theme profiles (colors, dark interface) with a settings UI and persistence. - New "Broncode" (source code) slide type: dark code sheet with syntax highlighting, a dedicated editor with a language picker, and Marp markdown round-trip via a fenced code block. - Presenter: eliminate the brief black frame between slides by precaching neighbouring slide images and enabling gaplessPlayback, so recordings stay clean. Adds round-trip tests for the code slide and translations for the new strings across all supported languages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
1.2 KiB
Dart
36 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'l10n/app_localizations.dart';
|
|
import 'state/settings_provider.dart';
|
|
import 'theme/app_theme.dart';
|
|
import 'widgets/app_shell.dart';
|
|
|
|
class OciDeckApp extends ConsumerWidget {
|
|
const OciDeckApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final languageCode = ref.watch(
|
|
settingsProvider.select((s) => s.languageCode),
|
|
);
|
|
final appearance = ref.watch(
|
|
settingsProvider.select((s) => s.appAppearanceProfile),
|
|
);
|
|
AppLocalizations.setActiveLanguageCode(languageCode);
|
|
return MaterialApp(
|
|
title: 'OciDeck',
|
|
theme: AppTheme.fromProfile(appearance),
|
|
debugShowCheckedModeBanner: false,
|
|
locale: AppLocalizations.materialLocaleFor(languageCode),
|
|
supportedLocales: AppLocalizations.supportedLocales,
|
|
localizationsDelegates: const [
|
|
AppLocalizations.delegate,
|
|
GlobalMaterialLocalizations.delegate,
|
|
GlobalCupertinoLocalizations.delegate,
|
|
GlobalWidgetsLocalizations.delegate,
|
|
],
|
|
home: const AppShell(),
|
|
);
|
|
}
|
|
}
|