Initial commit: Tagesbyte prototype
Flutter app that collects daily tech news from German and English RSS/Atom feeds, with a reader view, AI article summaries and daily briefings (Claude API or n8n webhook), paywall/sponsored filtering and ad/consent blocking. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
f12fb1dabb
159 files changed
+8738
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'services/storage.dart';
|
||||
import 'state/app_state.dart';
|
||||
import 'ui/common.dart';
|
||||
import 'ui/home_shell.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
// Portrait only; also set in AndroidManifest.xml and Info.plist.
|
||||
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
final state = AppState(await Storage.open());
|
||||
runApp(DailyTechNewsApp(state: state));
|
||||
state.init();
|
||||
}
|
||||
|
||||
class DailyTechNewsApp extends StatelessWidget {
|
||||
const DailyTechNewsApp({super.key, required this.state});
|
||||
|
||||
final AppState state;
|
||||
|
||||
static const _seed = Color(0xFF3355DD);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ThemeData theme(Brightness brightness) => ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: _seed, brightness: brightness),
|
||||
cardTheme: const CardThemeData(margin: EdgeInsets.zero),
|
||||
);
|
||||
|
||||
// Rebuild when the theme setting changes; everything else listens itself.
|
||||
return ListenableBuilder(
|
||||
listenable: state,
|
||||
builder: (context, _) => MaterialApp(
|
||||
title: appName,
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: theme(Brightness.light),
|
||||
darkTheme: theme(Brightness.dark),
|
||||
themeMode: state.settings.themeMode,
|
||||
home: HomeShell(state: state),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user