Skip to content

Commit 163313e

Browse files
committed
#334: updated text theme
1 parent ebbdb6d commit 163313e

27 files changed

+192
-196
lines changed

lib/screen/debug/debug_platform_selector_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class DebugPlatformSelectorScreenState extends State<DebugPlatformSelectorScreen
2424
return ProviderWidget<DebugPlatformSelectorViewModel>(
2525
create: getIt.call,
2626
consumerWithThemeAndLocalization: (context, value, _, theme, localization) => Scaffold(
27-
backgroundColor: theme.colorsTheme.background,
27+
backgroundColor: theme.background,
2828
appBar: AppBar(
2929
systemOverlayStyle: SystemUiOverlayStyle.light,
3030
leading: FlutterTemplateBackButton.light(onClick: value.onBackClicked),
3131
title: const Text('Select a platform'),
32-
backgroundColor: theme.colorsTheme.primary,
32+
backgroundColor: theme.primary,
3333
),
3434
body: Consumer<GlobalViewModel>(
3535
builder: (context, viewModel, child) => ListView(

lib/screen/license/license_screen.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_navigation_generator_annotations/flutter_navigation_generator_annotations.dart';
33
import 'package:flutter_template/di/injectable.dart';
4+
import 'package:flutter_template/styles/theme_data.dart';
45
import 'package:flutter_template/viewmodel/license/license_viewmodel.dart';
56
import 'package:flutter_template/widget/general/simple_screen/base_screen.dart';
67
import 'package:flutter_template/widget/provider/provider_widget.dart';
@@ -25,20 +26,20 @@ class LicenseScreenState extends State<LicenseScreen> {
2526
itemBuilder: (context, index) {
2627
final item = viewModel.licenses[index];
2728
return Card(
28-
color: theme.colorsTheme.background,
29+
color: theme.background,
2930
child: Padding(
3031
padding: const EdgeInsets.all(16),
3132
child: Column(
3233
crossAxisAlignment: CrossAxisAlignment.start,
3334
children: [
3435
Text(
3536
item.name,
36-
style: theme.coreTextTheme.titleNormal,
37+
style: theme.text.titleNormal,
3738
),
3839
Container(height: 8),
3940
Text(
4041
item.license,
41-
style: theme.coreTextTheme.bodySmall,
42+
style: theme.text.bodySmall,
4243
),
4344
],
4445
),

lib/screen/login/login_screen.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_navigation_generator_annotations/flutter_navigation_generator_annotations.dart';
33
import 'package:flutter_template/di/injectable.dart';
4+
import 'package:flutter_template/styles/theme_data.dart';
45
import 'package:flutter_template/util/keys.dart';
56
import 'package:flutter_template/viewmodel/login/login_viewmodel.dart';
67
import 'package:flutter_template/widget/general/simple_screen/base_screen.dart';
@@ -31,13 +32,13 @@ class LoginScreenState extends State<LoginScreen> {
3132
Container(height: 16),
3233
Text(
3334
'Login',
34-
style: theme.coreTextTheme.titleNormal,
35+
style: theme.text.titleNormal,
3536
textAlign: TextAlign.center,
3637
),
3738
Container(height: 32),
3839
Text(
3940
'Just fill in some text. There is no validator for the login',
40-
style: theme.coreTextTheme.labelButtonSmall,
41+
style: theme.text.labelButtonSmall,
4142
),
4243
Container(height: 32),
4344
FlutterTemplateInputField(

lib/screen/permission/analytics_permission_screen.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:flutter_navigation_generator_annotations/flutter_navigation_gene
33
import 'package:flutter_svg/flutter_svg.dart';
44
import 'package:flutter_template/di/injectable.dart';
55
import 'package:flutter_template/styles/theme_assets.dart';
6+
import 'package:flutter_template/styles/theme_data.dart';
67
import 'package:flutter_template/viewmodel/permission/analytics_permission_viewmodel.dart';
78
import 'package:flutter_template/widget/general/simple_screen/base_screen.dart';
89
import 'package:flutter_template/widget/general/styled/flutter_template_button.dart';
@@ -37,13 +38,13 @@ class AnalyticsPermissionScreen extends StatelessWidget {
3738
const SizedBox(height: 32),
3839
Text(
3940
localization.permissionAnalyticsTitle,
40-
style: theme.coreTextTheme.titleNormal,
41+
style: theme.text.titleNormal,
4142
),
4243
const SizedBox(height: 16),
4344
Text(
4445
localization.permissionAnalyticsDescription,
4546
textAlign: TextAlign.center,
46-
style: theme.coreTextTheme.bodyNormal,
47+
style: theme.text.bodyNormal,
4748
),
4849
const Spacer(),
4950
],

lib/screen/splash/splash_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SplashScreenState extends State<SplashScreen> {
2525
consumerWithThemeAndLocalization: (context, viewModel, child, theme, localization) => StatusBar.animated(
2626
isDarkStyle: theme.isDarkTheme,
2727
child: Scaffold(
28-
backgroundColor: theme.colorsTheme.primary,
28+
backgroundColor: theme.primary,
2929
body: const Center(
3030
child: FlutterTemplateProgressIndicator.light(),
3131
),

lib/screen/theme_mode/theme_mode_selector.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class ThemeModeSelectorScreenState extends State<ThemeModeSelectorScreen> {
2222
return ProviderWidget<DebugThemeSelectorViewModel>(
2323
create: getIt.call,
2424
childBuilderWithViewModel: (context, viewModel, theme, localization) => Scaffold(
25-
backgroundColor: theme.colorsTheme.background,
25+
backgroundColor: theme.background,
2626
appBar: AppBar(
2727
systemOverlayStyle: SystemUiOverlayStyle.light,
2828
leading: FlutterTemplateBackButton.light(onClick: viewModel.onBackClicked),
2929
title: const Text('Select a theme mode'),
30-
backgroundColor: theme.colorsTheme.primary,
30+
backgroundColor: theme.primary,
3131
),
3232
body: ListView(
3333
children: [

lib/screen/todo/todo_add/todo_add_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ class TodoAddScreenState extends State<TodoAddScreen> {
2424
return ProviderWidget<TodoAddViewModel>(
2525
create: getIt.call,
2626
childBuilderWithViewModel: (context, viewModel, theme, localization) => Scaffold(
27-
backgroundColor: theme.colorsTheme.background,
27+
backgroundColor: theme.background,
2828
appBar: AppBar(
2929
systemOverlayStyle: SystemUiOverlayStyle.light,
3030
leading: FlutterTemplateBackButton.light(
3131
onClick: viewModel.onBackClicked,
3232
),
3333
title: Text(localization.todoAddTitle),
34-
backgroundColor: theme.colorsTheme.primary,
34+
backgroundColor: theme.primary,
3535
),
3636
body: ScrollConfiguration(
3737
behavior: ScrollWhenNeededBehavior(),

lib/screen/todo/todo_list/todo_list_screen.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
22
import 'package:flutter_template/di/injectable.dart';
33
import 'package:flutter_template/model/webservice/todo/todo.dart';
44
import 'package:flutter_template/styles/theme_assets.dart';
5+
import 'package:flutter_template/styles/theme_data.dart';
56
import 'package:flutter_template/util/keys.dart';
67
import 'package:flutter_template/viewmodel/todo/todo_list/todo_list_viewmodel.dart';
78
import 'package:flutter_template/widget/general/action/action_item.dart';
@@ -33,13 +34,13 @@ class TodoListScreenState extends State<TodoListScreen> {
3334
key: Keys.downloadAction,
3435
svgAsset: ThemeAssets.downloadIcon(context),
3536
onClick: viewModel.onDownloadClicked,
36-
color: theme.colorsTheme.appBarAction,
37+
color: theme.appBarAction,
3738
),
3839
ActionItem(
3940
key: Keys.addAction,
4041
svgAsset: ThemeAssets.addIcon(context),
4142
onClick: viewModel.onAddClicked,
42-
color: theme.colorsTheme.appBarAction,
43+
color: theme.appBarAction,
4344
),
4445
],
4546
child: Builder(
@@ -49,7 +50,7 @@ class TodoListScreenState extends State<TodoListScreen> {
4950
return Center(
5051
child: Text(
5152
localization.getTranslation(errorKey),
52-
style: theme.coreTextTheme.bodyNormal.copyWith(color: theme.colorsTheme.errorText),
53+
style: theme.errorText.bodyNormal,
5354
),
5455
);
5556
}
@@ -67,7 +68,7 @@ class TodoListScreenState extends State<TodoListScreen> {
6768
child: Text(
6869
localization.todoEmptyState,
6970
textAlign: TextAlign.center,
70-
style: theme.coreTextTheme.bodyNormal,
71+
style: theme.text.bodyNormal,
7172
),
7273
),
7374
);
@@ -86,7 +87,7 @@ class TodoListScreenState extends State<TodoListScreen> {
8687
padding: const EdgeInsets.symmetric(horizontal: 16),
8788
child: Container(
8889
height: 1,
89-
color: theme.colorsTheme.primary.withOpacity(0.1),
90+
color: theme.primary.withOpacity(0.1),
9091
),
9192
),
9293
);

0 commit comments

Comments
 (0)