- Bump minimum Dart SDK version to
>=3.0.0 <4.0.0
- Add
analysis_options.yaml
file and apply linter recommendations
- BREAKING: Removed
onSegmentChosen
. UseonSegmentTapped
instead
In later versions, this package will require Dart SDK >=3.0.0 <4.0.0
. Consider upgrading Flutter to at least 3.10.0
Deprecated
onSegmentChosen
is deprecated and will be removed in later versions. UseonSegmentTapped
instead.
Other
- Bump Dart SDK requirement to
>= 2.19.0
- Add support for setting custom
textStyle
s and aborderWidth
for the entire widget (thanks to @chayanforyou)
Flutter 3
andDart 2.17
updates- Added Material 3 opt-in to the example app
x.y.z+B
versioning changed tox.y.z
scheme
- Fixed some static analysis issues (non-nullable types can never be null)
- Added
nullsafety
to the project - CHANGES:
selectedColor
,disabledColor
anddisabledColor
are no longer required and use default valuesonSegmentChosen
is no longer required and can be null. This has no effect so that you need to setdisabledChildren
in case you want disabled children (means the "ripple" effect on tap still exists)- Example project now uses
ElevatedButton
instead of deprecatedRaisedButton
- FIX:
??
is no longer used on non-nullable values
- Changed an insecure URL in the README.md to an https URL that links to the pub.dev page of this package.
- Fixed a wrong placed file in the
example
project - Added
publish_to
to the example project'spubspec.yaml
file.
Extended README.md to explain key features and referenced the example project.
Massively improved example
project. The following features were introduced there to showcase this package:
- "Toggle Disabled" button: shows the use of disabled children
- "Un-select all" button: Lets you clear the selection of all children
- Children can now have a length of 1
- Fixed
example/main.dart
issue #11 - addedScaffold
on top of the tree
- Removed deprecated
author
field from pubspec.yaml
- Disabled feature is now stable. Set children to be disabled with
disabledChildren
.
- Fixed issue #9 - You can now set a list of disabled children
- Disabled color defaults to Colors.grey (index 300).
- Related to issue #4 you can now customize your widget in a better way.
- Set the verticalOffset that controls the padding of a child.
- Fixed issue #7 - MSC is now usable inside a CupertinoApp.
- InkWell ripple effect added; the Material styled ripple effect is seen on (long) tapping a segment. That makes the widget feel more like Material.
- Fixed bug #6 - not setting selectedColor and unselectedColor causes the library to crash.
-
Maybe breaking version
-
Completely new approach behind the scenes
-
New coloring options
-
More customization
-
Define one single listener to get selected state
-
Removed issues
-
Better documentation on how to use
-
Works with every widget directly, no need to use a special class
SegmentedItem
- Define colors in MSC widget generally, you do not need to specify the colors for each item separately.
- Set initially selected item.
- Optical improvements
- Updated to Dart SDK version 2.2.2 !
- Provide the segmented control a list of children instead only left and right
- Define selection callback for each item itself
- Set colors for each item
- Customize color
- Set width
- Licensing info is under
LICENSE
- Initial release.