Skip to content

Commit f2143ea

Browse files
committed
Release 1.4.1
1 parent f981faf commit f2143ea

File tree

11 files changed

+56
-129
lines changed

11 files changed

+56
-129
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
# - Show outdated packages, just added for info.
1111
# - Verify that dart format is used by all committed code, fails if not. Controversial but pub.dev penalizes you if
1212
# dart format is not used.
13-
# - Run all tests.
13+
# - Run all tests with coverage.
14+
# - Upload code coverage output to Codecov for analysis.
1415
# - Install linux rpl tool. It is used to automate the needed change of a line in index.html.
1516
# - Build 5 different WEB example apps using FlexColorScheme. All examples use these steps:
1617
# - Flutter clean.
@@ -20,8 +21,8 @@
2021
# but runs on release, when it is published, created or edited.
2122
#
2223
# TODO Maybe set this workflow up to also run on a weekly schedule to check that nothing is broken?
23-
# Also planning to setup another matrix test run, but this one is also a nice test
24-
# since it does not just runs tests, but also builds actual Web apps using the package.
24+
# Also planning to setup a matrix test run, but this one is anyway a nice test
25+
# since it does not just runs tests, it also builds actual Web apps using the package.
2526
#
2627
name: Build Web
2728
on:

.github/workflows/build.yml.old-with-sep-jobs

Lines changed: 0 additions & 90 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# This GitHub action runs on a release, when it is published, created or edited.
2-
# TODO: Test how this trigger works in practice!
32
#
43
# - Installs dart and flutter
54
# - Uses flutter dev channel for now, will change to stable when web supported on stable.
@@ -11,7 +10,8 @@
1110
# - Show outdated packages, just added for info.
1211
# - Verify that dart format is used by all committed code, fails if not. Controversial but pub.dev penalizes you if
1312
# dart format is not used.
14-
# - Run all tests.
13+
# - Run all tests with coverage.
14+
# - Upload code coverage output to Codecov for analysis.
1515
# - Install linux rpl tool. It is used to automate the needed change of a line in index.html.
1616
# - Build 5 different WEB example apps using FlexColorScheme. All examples use these steps:
1717
# - Flutter clean.

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# This GitHub action runs on push to master, it:
2+
#
3+
# - Installs dart and flutter
4+
# - Uses flutter stable channel for now, might setup a matrix later with beta and dev included too.
5+
# - Gets package dependencies
6+
# - Runs dart analyze, allows deprecation warnings, we on purpose allow use of deprecated features for now.
7+
# - Show outdated packages, just added for info.
8+
# - Verify that dart format is used by all committed code, fails if not. Controversial but pub.dev penalizes you if
9+
# dart format is not used.
10+
# - Run all tests with coverage.
11+
# - Upload code coverage output to Codecov for analysis.
12+
#
113
name: Test
214
on:
315
push:
@@ -23,6 +35,9 @@ jobs:
2335
- name: Analyze Dart source
2436
run: dart analyze
2537

38+
- name: Show outdated packges
39+
run: flutter pub outdated
40+
2641
- name: Verify that Dart formatting is used, fail if not
2742
run: dart format --output=none --set-exit-if-changed .
2843

CHANGELOG.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to the **FlexColorScheme** package will be documented in this file.
44

5-
## [1.4.1] - January 30, 2021
5+
## [1.4.1] - January 31, 2021
66

77
* Added four new built-in color schemes.
88
* **Barossa** - Barossa red and cardin green theme.
@@ -15,8 +15,9 @@ All notable changes to the **FlexColorScheme** package will be documented in thi
1515
Use enum value `FlexScheme.damask` for easy access to it.
1616

1717
* Improved Semantics for the ThemeMode Widget buttons.
18-
* Improved the widget tests, makes and checks for system mode changes. Totally 723 tests, codecov > 99.5%.
19-
* Added GitHub actions to automate build and publish the examples on the web.
18+
* Improved FlexThemeModeSwitch widget tests, makes and checks for system mode changes.
19+
* More tests, totally 723 tests, codecov is now > 99.5%.
20+
* Added GitHub actions to automate build and to publish the examples on the Web on a new release.
2021
* Minor changes to the examples. Modified to not need the `late` keyword when they are converted
2122
to null safe versions.
2223
* **Documentation:**
@@ -207,7 +208,7 @@ Feel free to open a [suggestion or issue](https://github.com/rydmike/flex_color_
207208
- Version 1.4.0: Increased unit and widget test to 689 tests. All color definitions are now also tested to ensure
208209
they will not be changed by any accidental edit. Test coverage is higher than 95%, certainly sufficient for this
209210
type of package, but there are still some areas that could and will be improved.
210-
- Version 1.4.1 Consider testing sufficient for now.
211+
- Version 1.4.1 More tests, tests are now considered sufficient for current features.
211212
- Version 1.4.1 Added automated build and publish pipes for the Web examples!
212213

213214
### MAYBE
@@ -223,10 +224,10 @@ Feel free to open a [suggestion or issue](https://github.com/rydmike/flex_color_
223224
`FlexColorScheme` to be functionally on a level similar to `ColorScheme`, and therefore it should not cover
224225
serialization of itself. Serialization have to deal with a lot of potential failure points that I think should
225226
not have to be a concern in this type of component. I am not planning to add it, not yet at least, I might
226-
reconsider it later.
227+
reconsider this later.
227228

228-
My recommendation for saving the state of a `FlexColorScheme`. Include values for its settings that you
229-
use in your implementation, in other models in your application, like an "AppSettings" model or similar.
229+
My recommendation for saving the state of a `FlexColorScheme` is to include values for its settings that you
230+
use in your implementation in other models in your application, like an "AppSettings" model or similar.
230231
You probably serialize and store such data already, perhaps with shared preferences, hive, get_storage or
231232
some other solution. Include the values you need for your `FlexColorScheme` implementation in your stored settings
232233
and then use those values to restore your `FlexColorScheme` configuration and theme. This way, your implementation

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
color branding on surfaces. The created themes are based on the same concept as Flutter's ColorScheme based themes,
88
but with a few interesting twists and convenience features.
99

10-
For some additional information about **FlexColorScheme**, its background and use cases, this package companion
10+
For some additional information about **FlexColorScheme**, its background and use cases, the package companion
1111
[**blog post and article**](https://rydmike.com/colorscheme) is also recommended reading.
1212

1313
<img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/CollageSize50.png?raw=true" alt="ColorScheme Intro"/>
@@ -242,7 +242,7 @@ to using FlexColorScheme and is really only there to better demonstrate the resu
242242

243243

244244
> **NOTE:**
245-
> Version 1.4.0 introduces the easier and less verbose `scheme` convenience factory property used above.
245+
> Version 1.4.0 introduced the easier and less verbose `scheme` convenience factory property used above.
246246
> You can use it instead of `colors` if all you want to do is just use one of the built-in color schemes.
247247
> The previous way of
248248
> using `colors` with the `FlexColor.schemes` **map**, with the `FlexScheme` enum values as keys, works as before
@@ -306,9 +306,9 @@ With them you can see the active theme's colors, and the created theme's impact
306306

307307
<img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/fcs_phone_ex1al.png?raw=true" alt="ColorScheme example 1 light" width="180"/><img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/fcs_phone_ex1bl.png?raw=true" alt="ColorScheme example 1 lightb" width="180"/><img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/fcs_phone_ex1cl.png?raw=true" alt="ColorScheme example 1 dark" width="180"/>
308308

309-
The default sample app, example 1, just shows the simplest use-case of FlexColorScheme and barely scratches the
310-
surface of what it can do. To get the full details in a step by step progression you should go through the tutorial
311-
that uses examples 1 through 5 to introduce more features in a step by step complexity progression.
309+
The default sample app, example 1, shows the simplest use-case of FlexColorScheme and barely scratches the
310+
surface of what it can do. To get the full details in a step by step progression, go through the tutorial
311+
that uses examples 1 through 5, to introduce more features in a step by step complexity progression.
312312

313313
> **Building the examples**
314314
>If you cloned the repository to build the examples, you can open the package `/example` folder with your IDE to build
@@ -434,7 +434,7 @@ widget shows the theme with several common Material widgets.
434434

435435
This example is basically a repeat of the Flutter default counter app modification earlier, but with a different
436436
`HomePage` and a way to change the `MaterialApp` active `themeMode` property value via the `FlexThemeModeSwitch`
437-
switch on the `HomePage`, using a basic value changed callback function.
437+
switch on the `HomePage`, using a normal value changed callback function.
438438

439439
```dart
440440
void main() => runApp(const DemoApp());

example/lib/example4/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class HomePage extends StatelessWidget {
281281
EdgeInsets.symmetric(horizontal: AppConst.edgePadding),
282282
child: ShowThemeColors(),
283283
),
284-
const Divider(),
284+
const SizedBox(height: 8),
285285
// Open a sub-page
286286
ListTile(
287287
title: const Text('Open a demo subpage'),

example/lib/example5/main.dart

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,20 @@ class _HomePageState extends State<HomePage> {
750750
child: ShowThemeColors(),
751751
),
752752
const SizedBox(height: 8),
753+
// Open a sub-page
754+
ListTile(
755+
title: const Text('Open a demo subpage'),
756+
subtitle: const Text(
757+
'The subpage will use the same '
758+
'color scheme based theme automatically.',
759+
),
760+
trailing: const Icon(Icons.chevron_right, size: 34),
761+
onTap: () {
762+
Subpage.show(context);
763+
},
764+
),
765+
const Divider(),
766+
// const SizedBox(height: 8),
753767
SwitchListTile.adaptive(
754768
title: const Text('Compute dark theme'),
755769
subtitle: const Text(
@@ -925,19 +939,6 @@ class _HomePageState extends State<HomePage> {
925939
onChanged: widget.onUseToThemeChanged,
926940
),
927941
const Divider(),
928-
// Open a sub-page
929-
ListTile(
930-
title: const Text('Open a demo subpage'),
931-
subtitle: const Text(
932-
'The subpage will use the same '
933-
'color scheme based theme automatically.',
934-
),
935-
trailing: const Icon(Icons.chevron_right, size: 34),
936-
onTap: () {
937-
Subpage.show(context);
938-
},
939-
),
940-
const Divider(),
941942
Text('Menu', style: headline4),
942943
const Text(
943944
'The menu is a just a demo to make a larger '

example/lib/shared/subpage.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class _SubpageState extends State<Subpage> {
4646
actions: const <Widget>[AboutIconButton()],
4747
bottom: const TabBar(
4848
tabs: <Widget>[
49-
Tab(icon: Icon(Icons.home), text: 'Home'),
50-
Tab(icon: Icon(Icons.star), text: 'Favorites'),
51-
Tab(icon: Icon(Icons.face), text: 'Profile'),
52-
Tab(icon: Icon(Icons.settings), text: 'Settings'),
49+
Tab(text: 'Home'),
50+
Tab(text: 'Favorites'),
51+
Tab(text: 'Profile'),
52+
Tab(text: 'Settings'),
5353
],
5454
),
5555
),

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,4 @@ packages:
219219
version: "2.1.0-nullsafety.5"
220220
sdks:
221221
dart: ">=2.12.0-0.0 <3.0.0"
222-
flutter: ">=1.22.0 <2.0.0"
222+
flutter: ">=1.22.0"

0 commit comments

Comments
 (0)