Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#334 text theme #352

Open
wants to merge 3 commits into
base: feature/#336-base-screen
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/screen/debug/debug_platform_selector_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ class DebugPlatformSelectorScreenState extends State<DebugPlatformSelectorScreen
return ProviderWidget<DebugPlatformSelectorViewModel>(
create: getIt.call,
consumerWithThemeAndLocalization: (context, value, _, theme, localization) => Scaffold(
backgroundColor: theme.colorsTheme.background,
backgroundColor: theme.background,
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle.light,
leading: FlutterTemplateBackButton.light(onClick: value.onBackClicked),
title: const Text('Select a platform'),
backgroundColor: theme.colorsTheme.primary,
backgroundColor: theme.primary,
),
body: Consumer<GlobalViewModel>(
builder: (context, viewModel, child) => ListView(
Expand Down
7 changes: 4 additions & 3 deletions lib/screen/license/license_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_navigation_generator_annotations/flutter_navigation_generator_annotations.dart';
import 'package:flutter_template/di/injectable.dart';
import 'package:flutter_template/styles/theme_data.dart';
import 'package:flutter_template/viewmodel/license/license_viewmodel.dart';
import 'package:flutter_template/widget/general/simple_screen/base_screen.dart';
import 'package:flutter_template/widget/provider/provider_widget.dart';
Expand All @@ -25,20 +26,20 @@ class LicenseScreenState extends State<LicenseScreen> {
itemBuilder: (context, index) {
final item = viewModel.licenses[index];
return Card(
color: theme.colorsTheme.background,
color: theme.background,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
item.name,
style: theme.coreTextTheme.titleNormal,
style: theme.text.titleNormal,
),
Container(height: 8),
Text(
item.license,
style: theme.coreTextTheme.bodySmall,
style: theme.text.bodySmall,
),
],
),
Expand Down
5 changes: 3 additions & 2 deletions lib/screen/login/login_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_navigation_generator_annotations/flutter_navigation_generator_annotations.dart';
import 'package:flutter_template/di/injectable.dart';
import 'package:flutter_template/styles/theme_data.dart';
import 'package:flutter_template/util/keys.dart';
import 'package:flutter_template/viewmodel/login/login_viewmodel.dart';
import 'package:flutter_template/widget/general/simple_screen/base_screen.dart';
Expand Down Expand Up @@ -31,13 +32,13 @@ class LoginScreenState extends State<LoginScreen> {
Container(height: 16),
Text(
'Login',
style: theme.coreTextTheme.titleNormal,
style: theme.text.titleNormal,
textAlign: TextAlign.center,
),
Container(height: 32),
Text(
'Just fill in some text. There is no validator for the login',
style: theme.coreTextTheme.labelButtonSmall,
style: theme.text.labelButtonSmall,
),
Container(height: 32),
FlutterTemplateInputField(
Expand Down
5 changes: 3 additions & 2 deletions lib/screen/permission/analytics_permission_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter_navigation_generator_annotations/flutter_navigation_gene
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_template/di/injectable.dart';
import 'package:flutter_template/styles/theme_assets.dart';
import 'package:flutter_template/styles/theme_data.dart';
import 'package:flutter_template/viewmodel/permission/analytics_permission_viewmodel.dart';
import 'package:flutter_template/widget/general/simple_screen/base_screen.dart';
import 'package:flutter_template/widget/general/styled/flutter_template_button.dart';
Expand Down Expand Up @@ -37,13 +38,13 @@ class AnalyticsPermissionScreen extends StatelessWidget {
const SizedBox(height: 32),
Text(
localization.permissionAnalyticsTitle,
style: theme.coreTextTheme.titleNormal,
style: theme.text.titleNormal,
),
const SizedBox(height: 16),
Text(
localization.permissionAnalyticsDescription,
textAlign: TextAlign.center,
style: theme.coreTextTheme.bodyNormal,
style: theme.text.bodyNormal,
),
const Spacer(),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/screen/splash/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SplashScreenState extends State<SplashScreen> {
consumerWithThemeAndLocalization: (context, viewModel, child, theme, localization) => StatusBar.animated(
isDarkStyle: theme.isDarkTheme,
child: Scaffold(
backgroundColor: theme.colorsTheme.primary,
backgroundColor: theme.primary,
body: const Center(
child: FlutterTemplateProgressIndicator.light(),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/screen/theme_mode/theme_mode_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class ThemeModeSelectorScreenState extends State<ThemeModeSelectorScreen> {
return ProviderWidget<DebugThemeSelectorViewModel>(
create: getIt.call,
childBuilderWithViewModel: (context, viewModel, theme, localization) => Scaffold(
backgroundColor: theme.colorsTheme.background,
backgroundColor: theme.background,
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle.light,
leading: FlutterTemplateBackButton.light(onClick: viewModel.onBackClicked),
title: const Text('Select a theme mode'),
backgroundColor: theme.colorsTheme.primary,
backgroundColor: theme.primary,
),
body: ListView(
children: [
Expand Down
4 changes: 2 additions & 2 deletions lib/screen/todo/todo_add/todo_add_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class TodoAddScreenState extends State<TodoAddScreen> {
return ProviderWidget<TodoAddViewModel>(
create: getIt.call,
childBuilderWithViewModel: (context, viewModel, theme, localization) => Scaffold(
backgroundColor: theme.colorsTheme.background,
backgroundColor: theme.background,
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle.light,
leading: FlutterTemplateBackButton.light(
onClick: viewModel.onBackClicked,
),
title: Text(localization.todoAddTitle),
backgroundColor: theme.colorsTheme.primary,
backgroundColor: theme.primary,
),
body: ScrollConfiguration(
behavior: ScrollWhenNeededBehavior(),
Expand Down
11 changes: 6 additions & 5 deletions lib/screen/todo/todo_list/todo_list_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_template/di/injectable.dart';
import 'package:flutter_template/model/webservice/todo/todo.dart';
import 'package:flutter_template/styles/theme_assets.dart';
import 'package:flutter_template/styles/theme_data.dart';
import 'package:flutter_template/util/keys.dart';
import 'package:flutter_template/viewmodel/todo/todo_list/todo_list_viewmodel.dart';
import 'package:flutter_template/widget/general/action/action_item.dart';
Expand Down Expand Up @@ -33,13 +34,13 @@ class TodoListScreenState extends State<TodoListScreen> {
key: Keys.downloadAction,
svgAsset: ThemeAssets.downloadIcon(context),
onClick: viewModel.onDownloadClicked,
color: theme.colorsTheme.appBarAction,
color: theme.appBarAction,
),
ActionItem(
key: Keys.addAction,
svgAsset: ThemeAssets.addIcon(context),
onClick: viewModel.onAddClicked,
color: theme.colorsTheme.appBarAction,
color: theme.appBarAction,
),
],
child: Builder(
Expand All @@ -49,7 +50,7 @@ class TodoListScreenState extends State<TodoListScreen> {
return Center(
child: Text(
localization.getTranslation(errorKey),
style: theme.coreTextTheme.bodyNormal.copyWith(color: theme.colorsTheme.errorText),
style: theme.errorText.bodyNormal,
),
);
}
Expand All @@ -67,7 +68,7 @@ class TodoListScreenState extends State<TodoListScreen> {
child: Text(
localization.todoEmptyState,
textAlign: TextAlign.center,
style: theme.coreTextTheme.bodyNormal,
style: theme.text.bodyNormal,
),
),
);
Expand All @@ -86,7 +87,7 @@ class TodoListScreenState extends State<TodoListScreen> {
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Container(
height: 1,
color: theme.colorsTheme.primary.withOpacity(0.1),
color: theme.primary.withOpacity(0.1),
),
),
);
Expand Down
Loading