- Flutter/Dart (iOS + Android), Riverpod, go_router, i18n via ARB (deutsch) - Feature-Struktur: today, plants, locations, household (V2-Platzhalter), settings - Intervall-Modell: Aufgaben werden aus lastWatered/lastFertilized + Intervall berechnet - In-Memory-Demo-Daten, Firebase-Anbindung folgt im nächsten Block - Doku: Architektur, Firebase-Einrichtung, Forgejo-Git-Hosting Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
35 lines
1.1 KiB
Dart
35 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// Planty-Grün als Ausgangsfarbe für das gesamte Farbschema.
|
|
const _seedColor = Color(0xFF2E7D32);
|
|
|
|
ThemeData buildAppTheme({
|
|
required Brightness brightness,
|
|
required bool highContrast,
|
|
}) {
|
|
final colorScheme = ColorScheme.fromSeed(
|
|
seedColor: _seedColor,
|
|
brightness: brightness,
|
|
// Material 3 kann kontrastverstärkte Varianten desselben Schemas erzeugen.
|
|
contrastLevel: highContrast ? 1.0 : 0.0,
|
|
);
|
|
|
|
return ThemeData(
|
|
colorScheme: colorScheme,
|
|
// Großzügige Touch-Ziele: wichtig für die Bedienbarkeit durch ältere Nutzer.
|
|
materialTapTargetSize: MaterialTapTargetSize.padded,
|
|
visualDensity: VisualDensity.standard,
|
|
filledButtonTheme: FilledButtonThemeData(
|
|
style: FilledButton.styleFrom(
|
|
minimumSize: const Size(64, 52),
|
|
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
|
),
|
|
),
|
|
listTileTheme: const ListTileThemeData(
|
|
minVerticalPadding: 12,
|
|
),
|
|
snackBarTheme: const SnackBarThemeData(
|
|
behavior: SnackBarBehavior.floating,
|
|
),
|
|
);
|
|
}
|