Skip to content

Commit

Permalink
Version 2.1.1 Made the VoidCallback onSelect in `FlexThemeModeOptio…
Browse files Browse the repository at this point in the history
…nButton` nullable
  • Loading branch information
rydmike committed Mar 30, 2021
1 parent 64bfc66 commit 15608ca
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
name: Build Web
on:
pull_request:
branches: [master]
branches: [none-null-safe]
# push:
# branches: [ master ]
# release:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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

## [2.1.1] - March 30, 2021

* **Change:** Made the VoidCallback `onSelect` in `FlexThemeModeOptionButton` nullable.
The optional callback allows for the button to be used e.g. as a trailing
widget in a ListTile. Keep it null to not have any callback, nor hover or Ink of its own, and use
the select event of the parent instead. When it is used as standalone button you
normally want to use this callback, but not if you want the parent to handle it, that use case was
not allowed with previous version.

## [2.1.0] - March 22, 2021

* **Fix:** Toggling `FlexColorScheme(transparentStatusBar)` from true to false, did not restore the
Expand Down
2 changes: 1 addition & 1 deletion example/lib/shared/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AppConst {
// When I build a new public version I just make sure to update this info
// before building them.
static const String appName = 'FlexColorScheme';
static const String version = '2.1.0';
static const String version = '2.1.1';
static const String packageVersion = 'FlexColorScheme package $version';
static const String packageUrl = 'https://pub.dev/packages/flex_color_scheme';
static const String flutterVersion = 'Channel dev, 2.1.0-12.1.pre, CanvasKit';
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.1.0"
version: "2.1.1"
flutter:
dependency: "direct main"
description: flutter
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flex_color_scheme_example
description: Five examples that demonstrate how to use the FlexColorScheme package.
version: 2.1.0
version: 2.1.1
publish_to: 'none'
environment:
sdk: '>=2.12.0 <3.0.0'
Expand All @@ -11,7 +11,7 @@ dependencies:
cupertino_icons: ^1.0.2

# Color scheme package (by Mike Rydstrom, rydmike.com).
flex_color_scheme: ^2.1.0
flex_color_scheme: ^2.1.1

# The Flutter SDK (by Google flutter.dev).
flutter:
Expand Down
8 changes: 6 additions & 2 deletions lib/src/flex_theme_mode_switch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class FlexThemeModeOptionButton extends StatelessWidget {
this.labelStyle,
this.labelAbove = true,
required this.selected,
required this.onSelect,
this.onSelect,
this.selectedBorder,
this.unselectedBorder,
this.elevation = 0,
Expand Down Expand Up @@ -326,7 +326,11 @@ class FlexThemeModeOptionButton extends StatelessWidget {
final bool selected;

/// The button was clicked and selected.
final VoidCallback onSelect;
///
/// The optional callback allows for the button to be used eg as a trailing
/// widget in a ListTile. Keep it null to not have any callback and use the
/// click event in the parent instead.
final VoidCallback? onSelect;

/// Border side for the selected option state.
/// If null, defaults to
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flex_color_scheme
description: A Flutter package to make and use beautiful color scheme based MaterialApp themes.
version: 2.1.0
version: 2.1.1
homepage: https://github.com/rydmike/flex_color_scheme

environment:
Expand Down

0 comments on commit 15608ca

Please sign in to comment.