mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Start moving to material 3
Also dark mode at last
This commit is contained in:
@@ -66,7 +66,7 @@ Widget createDashboardScreen({locale = 'en'}) {
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
theme: wgerTheme,
|
||||
theme: wgerLightTheme,
|
||||
home: DashboardScreen(),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ Widget createWorkoutDetailScreen({locale = 'en'}) {
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
theme: wgerTheme,
|
||||
theme: wgerLightTheme,
|
||||
navigatorKey: key,
|
||||
home: TextButton(
|
||||
onPressed: () => key.currentState!.push(
|
||||
|
||||
@@ -39,7 +39,7 @@ Widget createGymModeScreen({locale = 'en'}) {
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
navigatorKey: key,
|
||||
theme: wgerTheme,
|
||||
theme: wgerLightTheme,
|
||||
home: TextButton(
|
||||
onPressed: () => key.currentState!.push(
|
||||
MaterialPageRoute<void>(
|
||||
|
||||
@@ -24,7 +24,7 @@ Widget createMeasurementScreen({locale = 'en'}) {
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
theme: wgerTheme,
|
||||
theme: wgerLightTheme,
|
||||
home: MeasurementCategoriesScreen(),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -107,7 +107,7 @@ Widget createNutritionalPlanScreen({locale = 'en'}) {
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
theme: wgerTheme,
|
||||
theme: wgerLightTheme,
|
||||
navigatorKey: key,
|
||||
home: TextButton(
|
||||
onPressed: () => key.currentState!.push(
|
||||
|
||||
@@ -36,7 +36,7 @@ Widget createWeightScreen({locale = 'en'}) {
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
theme: wgerTheme,
|
||||
theme: wgerLightTheme,
|
||||
home: WeightScreen(),
|
||||
routes: {
|
||||
FormScreen.routeName: (ctx) => FormScreen(),
|
||||
|
||||
@@ -127,7 +127,9 @@ class MyApp extends StatelessWidget {
|
||||
child: Consumer<AuthProvider>(
|
||||
builder: (ctx, auth, _) => MaterialApp(
|
||||
title: 'wger',
|
||||
theme: wgerTheme,
|
||||
theme: wgerLightTheme,
|
||||
darkTheme: wgerDarkTheme,
|
||||
themeMode: ThemeMode.system,
|
||||
home: auth.isAuth
|
||||
? HomeTabsScreen()
|
||||
: FutureBuilder(
|
||||
|
||||
@@ -144,7 +144,7 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
|
||||
),
|
||||
Text(
|
||||
AppLocalizations.of(context).loadingText,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -26,7 +26,7 @@ class UpdateAppScreen extends StatelessWidget {
|
||||
body: AlertDialog(
|
||||
title: Text(
|
||||
AppLocalizations.of(context).appUpdateTitle,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
content: Text(AppLocalizations.of(context).appUpdateContent),
|
||||
actions: null,
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
import 'package:charts_flutter/flutter.dart' as charts;
|
||||
import 'package:flex_seed_scheme/flex_seed_scheme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
|
||||
const Color wgerPrimaryColor = Color(0xff2a4c7d);
|
||||
@@ -29,6 +29,26 @@ const Color wgerSecondaryColorLight = Color(0xffF6B4BA);
|
||||
const Color wgerTextMuted = Colors.black38;
|
||||
const Color wgerBackground = Color(0xfff4f4f6);
|
||||
|
||||
// Make a light ColorScheme from the seeds.
|
||||
final ColorScheme schemeLight = SeedColorScheme.fromSeeds(
|
||||
brightness: Brightness.light,
|
||||
// Primary key color is required, like seed color ColorScheme.fromSeed.
|
||||
primaryKey: wgerPrimaryColor,
|
||||
// You can add optional own seeds for secondary and tertiary key colors.
|
||||
secondaryKey: wgerSecondaryColor,
|
||||
// Tone chroma config and tone mapping is optional, if you do not add it
|
||||
// you get the config matching Flutter's Material 3 ColorScheme.fromSeed.
|
||||
tones: FlexTones.vivid(Brightness.light),
|
||||
);
|
||||
|
||||
// Make a dark ColorScheme from the seeds.
|
||||
final ColorScheme schemeDark = SeedColorScheme.fromSeeds(
|
||||
brightness: Brightness.dark,
|
||||
primaryKey: wgerPrimaryColor,
|
||||
secondaryKey: wgerSecondaryColor,
|
||||
tones: FlexTones.vivid(Brightness.dark),
|
||||
);
|
||||
|
||||
// Chart colors
|
||||
const charts.Color wgerChartPrimaryColor = charts.Color(r: 0x2a, g: 0x4c, b: 0x7d);
|
||||
const charts.Color wgerChartSecondaryColor = charts.Color(r: 0xe6, g: 0x39, b: 0x46);
|
||||
@@ -44,96 +64,32 @@ const materialSizes = {
|
||||
'h6': 20.0,
|
||||
};
|
||||
|
||||
final ThemeData wgerTheme = ThemeData(
|
||||
/*
|
||||
* General stuff
|
||||
*/
|
||||
primaryColor: wgerPrimaryColor,
|
||||
scaffoldBackgroundColor: wgerBackground,
|
||||
final wgerLightTheme = ThemeData.from(
|
||||
colorScheme: schemeLight,
|
||||
useMaterial3: true,
|
||||
textTheme: const TextTheme(
|
||||
displayLarge: TextStyle(fontSize: 57, fontFamily: 'OpenSansLight', fontWeight: FontWeight.bold),
|
||||
displayMedium:
|
||||
TextStyle(fontSize: 45, fontFamily: 'OpenSansLight', fontWeight: FontWeight.bold),
|
||||
displaySmall: TextStyle(fontSize: 36, fontFamily: 'OpenSansLight', fontWeight: FontWeight.bold),
|
||||
headlineLarge: TextStyle(fontSize: 32, fontFamily: 'OpenSansLight'),
|
||||
headlineMedium: TextStyle(fontSize: 28, fontFamily: 'OpenSansLight'),
|
||||
headlineSmall: TextStyle(fontSize: 24, fontFamily: 'OpenSansLight'),
|
||||
titleLarge: TextStyle(fontSize: 22, fontFamily: 'OpenSansLight'),
|
||||
titleMedium: TextStyle(fontSize: 16, fontFamily: 'OpenSansLight'),
|
||||
titleSmall: TextStyle(fontSize: 14, fontFamily: 'OpenSansLight'),
|
||||
labelLarge: TextStyle(fontSize: 14, fontFamily: 'OpenSansLight'),
|
||||
labelMedium: TextStyle(fontSize: 12, fontFamily: 'OpenSansLight'),
|
||||
labelSmall: TextStyle(fontSize: 11, fontFamily: 'OpenSansLight'),
|
||||
bodyLarge: TextStyle(fontSize: 16, fontFamily: 'OpenSansLight'),
|
||||
bodyMedium: TextStyle(fontSize: 14, fontFamily: 'OpenSansLight'),
|
||||
bodySmall: TextStyle(fontSize: 12, fontFamily: 'OpenSansLight'),
|
||||
),
|
||||
);
|
||||
|
||||
// This makes the visual density adapt to the platform that you run
|
||||
// the app on. For desktop platforms, the controls will be smaller and
|
||||
// closer together (more dense) than on mobile platforms.
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
|
||||
// Show icons in the system's bar in light colors
|
||||
appBarTheme: const AppBarTheme(
|
||||
systemOverlayStyle: SystemUiOverlayStyle.dark,
|
||||
color: wgerPrimaryColor,
|
||||
),
|
||||
|
||||
/*
|
||||
* Text theme
|
||||
*/
|
||||
textTheme: TextTheme(
|
||||
headline1: const TextStyle(fontFamily: 'OpenSansLight', color: Colors.black),
|
||||
headline2: const TextStyle(fontFamily: 'OpenSansLight', color: Colors.black),
|
||||
headline3: TextStyle(
|
||||
fontSize: materialSizes['h3']! * 0.8,
|
||||
fontFamily: 'OpenSansBold',
|
||||
color: Colors.black,
|
||||
),
|
||||
headline4: TextStyle(
|
||||
fontSize: materialSizes['h4']! * 0.8,
|
||||
fontFamily: 'OpenSansBold',
|
||||
color: Colors.black,
|
||||
),
|
||||
headline5: TextStyle(
|
||||
fontSize: materialSizes['h5'],
|
||||
fontFamily: 'OpenSansBold',
|
||||
color: Colors.black,
|
||||
),
|
||||
headline6: TextStyle(
|
||||
fontSize: materialSizes['h6']! * 0.8,
|
||||
fontFamily: 'OpenSansBold',
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
|
||||
/*
|
||||
* Button theme
|
||||
*/
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
primary: wgerPrimaryButtonColor,
|
||||
),
|
||||
),
|
||||
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: wgerPrimaryButtonColor,
|
||||
visualDensity: VisualDensity.compact,
|
||||
side: const BorderSide(color: wgerPrimaryButtonColor),
|
||||
),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: wgerPrimaryButtonColor,
|
||||
),
|
||||
),
|
||||
|
||||
/*
|
||||
* Forms, etc.
|
||||
*/
|
||||
sliderTheme: const SliderThemeData(
|
||||
activeTrackColor: wgerPrimaryButtonColor,
|
||||
thumbColor: wgerPrimaryColor,
|
||||
),
|
||||
colorScheme: ColorScheme.fromSwatch().copyWith(secondary: wgerSecondaryColor),
|
||||
// Text Selection Theme
|
||||
textSelectionTheme: TextSelectionThemeData(
|
||||
cursorColor: wgerPrimaryColor,
|
||||
selectionColor: wgerPrimaryColor.withOpacity(0.2),
|
||||
selectionHandleColor: wgerPrimaryColor,
|
||||
),
|
||||
// Text Fields Theme
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
focusColor: wgerPrimaryColor,
|
||||
iconColor: Colors.grey.shade600,
|
||||
floatingLabelStyle: const TextStyle(color: wgerPrimaryColor),
|
||||
focusedBorder: const UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: wgerPrimaryColor),
|
||||
),
|
||||
),
|
||||
final wgerDarkTheme = ThemeData.from(
|
||||
colorScheme: schemeDark,
|
||||
useMaterial3: true,
|
||||
);
|
||||
|
||||
const wgerCalendarStyle = CalendarStyle(
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:table_calendar/table_calendar.dart';
|
||||
@@ -215,7 +214,7 @@ class _DashboardCalendarWidgetState extends State<DashboardCalendarWidget>
|
||||
ListTile(
|
||||
title: Text(
|
||||
AppLocalizations.of(context).calendar,
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
leading: const Icon(
|
||||
Icons.calendar_today_outlined,
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
@@ -163,7 +162,7 @@ class _DashboardNutritionWidgetState extends State<DashboardNutritionWidget> {
|
||||
ListTile(
|
||||
title: Text(
|
||||
_hasContent ? _plan!.description : AppLocalizations.of(context).nutritionalPlan,
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
subtitle: Text(
|
||||
_hasContent
|
||||
@@ -255,7 +254,7 @@ class _DashboardWeightWidgetState extends State<DashboardWeightWidget> {
|
||||
ListTile(
|
||||
title: Text(
|
||||
AppLocalizations.of(context).weight,
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
leading: const FaIcon(
|
||||
FontAwesomeIcons.weight,
|
||||
@@ -352,7 +351,7 @@ class _DashboardMeasurementWidgetState extends State<DashboardMeasurementWidget>
|
||||
ListTile(
|
||||
title: Text(
|
||||
AppLocalizations.of(context).measurements,
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
leading: const FaIcon(
|
||||
FontAwesomeIcons.weight,
|
||||
@@ -528,7 +527,7 @@ class _DashboardWorkoutWidgetState extends State<DashboardWorkoutWidget> {
|
||||
ListTile(
|
||||
title: Text(
|
||||
_hasContent ? _workoutPlan!.name : AppLocalizations.of(context).labelWorkoutPlan,
|
||||
style: Theme.of(context).textTheme.headline4,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
subtitle: Text(
|
||||
_hasContent
|
||||
|
||||
@@ -85,7 +85,7 @@ class ExerciseDetail extends StatelessWidget {
|
||||
|
||||
out.add(Text(
|
||||
AppLocalizations.of(context).variations,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
));
|
||||
Provider.of<ExercisesProvider>(context, listen: false)
|
||||
.findExerciseBasesByVariationId(
|
||||
@@ -107,7 +107,7 @@ class ExerciseDetail extends StatelessWidget {
|
||||
if (_exercise.notes.isNotEmpty) {
|
||||
out.add(Text(
|
||||
AppLocalizations.of(context).notes,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
));
|
||||
for (final e in _exercise.notes) {
|
||||
out.add(Text(e.comment));
|
||||
@@ -122,7 +122,7 @@ class ExerciseDetail extends StatelessWidget {
|
||||
final List<Widget> out = [];
|
||||
out.add(Text(
|
||||
AppLocalizations.of(context).muscles,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
));
|
||||
out.add(Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
@@ -180,7 +180,7 @@ class ExerciseDetail extends StatelessWidget {
|
||||
final List<Widget> out = [];
|
||||
out.add(Text(
|
||||
AppLocalizations.of(context).description,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
));
|
||||
out.add(Html(data: _exercise.description));
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class _ExerciseFilterModalBodyState extends State<ExerciseFilterModalBody> {
|
||||
return Container(
|
||||
child: Text(
|
||||
filterCategory.title,
|
||||
style: theme.textTheme.headline5,
|
||||
style: theme.textTheme.headlineSmall,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -52,7 +52,7 @@ class ExerciseListTile extends StatelessWidget {
|
||||
),
|
||||
title: Text(
|
||||
exerciseBase.getExercise(Localizations.localeOf(context).languageCode).name,
|
||||
//style: theme.textTheme.headline6,
|
||||
//style: theme.textTheme.titleLarge,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
),
|
||||
|
||||
@@ -61,7 +61,7 @@ class Gallery extends StatelessWidget {
|
||||
Text(
|
||||
DateFormat.yMd(Localizations.localeOf(context).languageCode)
|
||||
.format(currentImage.date),
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
Expanded(
|
||||
child: Image.network(currentImage.url!),
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import '../../models/measurements/measurement_category.dart';
|
||||
import '../../screens/form_screen.dart';
|
||||
import '../../screens/measurement_entries_screen.dart';
|
||||
import '../core/charts.dart';
|
||||
import 'forms.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class CategoriesCard extends StatelessWidget {
|
||||
MeasurementCategory currentCategory;
|
||||
@@ -23,7 +23,7 @@ class CategoriesCard extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(top: 5),
|
||||
child: Text(
|
||||
currentCategory.name,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
|
||||
@@ -232,14 +232,14 @@ class DismissibleMealHeader extends StatelessWidget {
|
||||
if (_meal.name != '')
|
||||
Text(
|
||||
_meal.name,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
_meal.time!.format(context),
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
|
||||
@@ -32,7 +32,9 @@ import 'package:wger/widgets/nutrition/meal.dart';
|
||||
|
||||
class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
final NutritionalPlan _nutritionalPlan;
|
||||
|
||||
const NutritionalPlanDetailWidget(this._nutritionalPlan);
|
||||
|
||||
static const double tablePadding = 7;
|
||||
|
||||
@override
|
||||
@@ -208,10 +210,10 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
Text(
|
||||
'${AppLocalizations.of(context).planned} / ${AppLocalizations.of(context).logged} / ${AppLocalizations.of(context).weekAverage}',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
|
||||
NutritionalPlanHatchBarChartWidget(_nutritionalPlan),
|
||||
|
||||
NutritionalPlanHatchBarChartWidget(_nutritionalPlan),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.all(15),
|
||||
// height: 300,
|
||||
@@ -221,7 +223,7 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
Text(
|
||||
AppLocalizations.of(context).nutritionalDiary,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(15),
|
||||
|
||||
@@ -295,7 +295,7 @@ class DayHeaderDismissible extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
_day.description,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(_day.getDaysTextTranslated(Localizations.localeOf(context).languageCode)),
|
||||
|
||||
@@ -582,7 +582,7 @@ class ExerciseSetting extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).setNr(i + 1),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
@@ -655,7 +655,7 @@ class ExerciseSetting extends StatelessWidget {
|
||||
ListTile(
|
||||
title: Text(
|
||||
_exerciseBase.getExercise(Localizations.localeOf(context).languageCode).name,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
subtitle: Text(_exerciseBase.category.name),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
|
||||
@@ -197,7 +197,7 @@ class StartPage extends StatelessWidget {
|
||||
s.exerciseBaseObj
|
||||
.getExercise(Localizations.localeOf(context).languageCode)
|
||||
.name,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
...set.getSmartRepr(s.exerciseBaseObj).map((e) => Text(e)).toList(),
|
||||
const SizedBox(height: 15),
|
||||
@@ -426,7 +426,7 @@ class _LogPageState extends State<LogPage> {
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).newEntry,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
if (!_detailed)
|
||||
@@ -523,7 +523,7 @@ class _LogPageState extends State<LogPage> {
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).labelWorkoutLogs,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
...widget._workoutPlan
|
||||
@@ -569,7 +569,7 @@ class _LogPageState extends State<LogPage> {
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).plateCalculator,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
SizedBox(
|
||||
height: 35,
|
||||
@@ -629,7 +629,7 @@ class _LogPageState extends State<LogPage> {
|
||||
Center(
|
||||
child: Text(
|
||||
widget._setting.singleSettingRepText,
|
||||
style: Theme.of(context).textTheme.headline3,
|
||||
style: Theme.of(context).textTheme.displaySmall,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
@@ -688,13 +688,13 @@ class ExerciseOverview extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
getTranslation(_exerciseBase.category.name, context),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
..._exerciseBase.equipment
|
||||
.map((e) => Text(
|
||||
getTranslation(e.name, context),
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
textAlign: TextAlign.center,
|
||||
))
|
||||
.toList(),
|
||||
@@ -992,7 +992,7 @@ class _TimerWidgetState extends State<TimerWidget> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
DateFormat('m:ss').format(today.add(Duration(seconds: _seconds))),
|
||||
style: Theme.of(context).textTheme.headline1!.copyWith(color: wgerPrimaryColor),
|
||||
style: Theme.of(context).textTheme.displayLarge!.copyWith(color: wgerPrimaryColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1115,7 +1115,7 @@ class NavigationHeader extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
_title,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:wger/helpers/ui.dart';
|
||||
@@ -78,7 +77,7 @@ class _DayLogWidgetState extends State<DayLogWidget> {
|
||||
children: [
|
||||
Text(
|
||||
DateFormat.yMd(Localizations.localeOf(context).languageCode).format(widget._date),
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
if (widget._session != null) const Text('Session data here'),
|
||||
...widget._exerciseData.keys.map((base) {
|
||||
@@ -88,7 +87,7 @@ class _DayLogWidgetState extends State<DayLogWidget> {
|
||||
if (widget._exerciseData[base]!.isNotEmpty)
|
||||
Text(
|
||||
exercise.name,
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
)
|
||||
else
|
||||
Container(),
|
||||
|
||||
@@ -31,6 +31,7 @@ import 'package:wger/widgets/workouts/log.dart';
|
||||
class WorkoutLogs extends StatefulWidget {
|
||||
final WorkoutPlan _workoutPlan;
|
||||
final Function _changeMode;
|
||||
|
||||
const WorkoutLogs(this._workoutPlan, this._changeMode);
|
||||
|
||||
@override
|
||||
@@ -65,7 +66,7 @@ class _WorkoutLogsState extends State<WorkoutLogs> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
AppLocalizations.of(context).labelWorkoutLogs,
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
||||
10
pubspec.lock
10
pubspec.lock
@@ -313,6 +313,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
flex_seed_scheme:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flex_seed_scheme
|
||||
sha256: b3678d82403c13dec2ee2721e078b26f14577712411b6aa981b0f4269df3fabb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.4"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@@ -1379,4 +1387,4 @@ packages:
|
||||
version: "3.1.1"
|
||||
sdks:
|
||||
dart: ">=2.19.0 <3.0.0"
|
||||
flutter: ">=3.3.0"
|
||||
flutter: ">=3.7.0"
|
||||
|
||||
@@ -58,6 +58,7 @@ dependencies:
|
||||
carousel_slider: ^4.2.1
|
||||
multi_select_flutter: ^4.1.3
|
||||
flutter_svg: ^0.23.0+1
|
||||
flex_seed_scheme: ^1.2.4
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user