trainlog-egu5j / lib /src /core /theme /app_theme.dart
kuubson's picture
Zaprojektuj i wygeneruj kompletną aplikację Flutter (Dart) działającą na iOS, o nazwie TrainLog: dziennik treningu i śledzenie progresu siłowego/sylwetkowego. Aplikacja ma działać offline-first (bez b
afe1e75 verified
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class AppTheme {
static CupertinoThemeData lightTheme = const CupertinoThemeData(
brightness: Brightness.light,
primaryColor: CupertinoColors.activeOrange,
scaffoldBackgroundColor: CupertinoColors.systemGroupedBackground,
textTheme: CupertinoTextThemeData(
navTitleTextStyle: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: CupertinoColors.black,
),
),
);
static CupertinoThemeData darkTheme = const CupertinoThemeData(
brightness: Brightness.dark,
primaryColor: CupertinoColors.activeOrange,
scaffoldBackgroundColor: CupertinoColors.black,
textTheme: CupertinoTextThemeData(
navTitleTextStyle: TextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: CupertinoColors.white,
),
),
);
// Material dla komponentów Material (Charts itp)
static ThemeData materialLight = ThemeData(
useMaterial3: true,
brightness: Brightness.light,
colorScheme: ColorScheme.fromSeed(
seedColor: CupertinoColors.activeOrange,
brightness: Brightness.light,
),
);
static ThemeData materialDark = ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorScheme: ColorScheme.fromSeed(
seedColor: CupertinoColors.activeOrange,
brightness: Brightness.dark,
),
);
}