Skip to content

Commit

Permalink
Properly fix color scheme
Browse files Browse the repository at this point in the history
Related to flutter PR81336: flutter/flutter#81336
  • Loading branch information
smanilov committed Mar 20, 2024
1 parent 5f34901 commit 1164400
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ android {
applicationId "com.aethok.t700kilos"
minSdkVersion 19 // Needed by file pick/save dialogs.
targetSdkVersion 33
versionCode 6
versionName "1.0.4"
versionCode 7
versionName "1.0.5"
}

signingConfigs {
Expand Down
21 changes: 11 additions & 10 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,21 @@ class T700KilosApp extends StatelessWidget {
final Storage storage;
final Clock clock;
final MorningEveningAnalyser morningEveningAnalyser;

// TODO: make non-nullable when finished and added to test
final SwipeAnalyser? swipeAnalyser;
final ColorScheme colorScheme =
ThemeData().colorScheme.copyWith(primary: Colors.yellow);

T700KilosApp(
this.storage,
this.clock,
this.morningEveningAnalyser,
[this.swipeAnalyser]
);
T700KilosApp(this.storage, this.clock, this.morningEveningAnalyser,
[this.swipeAnalyser]);

@override
Widget build(BuildContext context) {
final ThemeData theme = ThemeData();
return MaterialApp(
title: '700 kilos',
theme: theme.copyWith(
colorScheme: theme.colorScheme
.copyWith(primary: Colors.yellow, secondary: Colors.yellow)),
theme: theme.copyWith(colorScheme: colorScheme),
home: createWelcomeWidget(),
);
}
Expand Down Expand Up @@ -215,6 +212,7 @@ class _NewEntryWidgetState extends State<NewEntryWidget> {
),
]
: [],
backgroundColor: widget.app.colorScheme.primary,
),
body: Center(
child:
Expand Down Expand Up @@ -260,7 +258,8 @@ class _NewEntryWidgetState extends State<NewEntryWidget> {
floatingActionButton: FloatingActionButton(
child: Icon(Icons.check),
tooltip: 'Submit',
onPressed: () async => await _pushSubmit(timeController.text)),
onPressed: () async => await _pushSubmit(timeController.text),
backgroundColor: widget.app.colorScheme.primary),
),
);
}
Expand Down Expand Up @@ -412,12 +411,14 @@ class _ShowSavedWidgetState extends State<ShowSavedWidget> {
onPressed: _pushImportExport,
),
],
backgroundColor: widget.app.colorScheme.primary,
),
body: ListView(children: divided),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
tooltip: 'New entry',
onPressed: () async => await widget.app.navigateToNewEntry(context),
backgroundColor: widget.app.colorScheme.primary,
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.4
version: 1.0.5

environment:
sdk: '>=3.3.0 <4.0.0'
Expand Down

0 comments on commit 1164400

Please sign in to comment.