https://github.com/mindinventory/animated_segment
This package will animate a segment. The package provides you with a modern animated fancy segment. Show selection of tab using elastic way animation.
https://github.com/mindinventory/animated_segment
animated-segment-controller dart-segment-controller flutter-animated-segment-controller flutter-segment-controller segment-controller
Last synced: 12 months ago
JSON representation
This package will animate a segment. The package provides you with a modern animated fancy segment. Show selection of tab using elastic way animation.
- Host: GitHub
- URL: https://github.com/mindinventory/animated_segment
- Owner: Mindinventory
- License: mit
- Created: 2021-12-29T13:20:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-19T06:39:06.000Z (almost 4 years ago)
- Last Synced: 2023-08-20T21:24:59.028Z (almost 3 years ago)
- Topics: animated-segment-controller, dart-segment-controller, flutter-animated-segment-controller, flutter-segment-controller, segment-controller
- Language: Dart
- Homepage: https://www.mindinventory.com/flutter-app-development.php
- Size: 1.09 MB
- Stars: 24
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# animated_segment
This package will animates a segment. Package provides you a modern animated fancy segment. Show selection of tab using elastic way animation.
### Animated Segment

## Usage
### Example
AnimatedSegment(
segmentNames: [Strings.tab_1, Strings.tab_2, Strings.tab_3],
onSegmentChanged: (index) {
print('Selected Segment Index is: $index');
},
backgroundColor: AppColors.bgColor,
segmentTextColor: AppColors.white,
rippleEffectColor: AppColors.primary,
selectedSegmentColor: AppColors.primary,
);
### Required parameters
##### segmentNames:
This property takes List as a parameter and segmentNames is useful to display items in segment.
##### onSegmentChanged:
Call back called when the user select the new segment and return the selected segment index. Index for the initial selected segment is `0`.
### Optional parameters
##### initialSegment:
This property takes int value as a parameter. This is use to set the initial segment from [segmentNames].
##### backgroundColor:
This property takes Color value as a parameter. You can change the background color of animated segment. default value is `Color(0xff8AADFB)`
##### segmentTextColor:
This property takes Color value as a parameter. You can change the text color of segmented text color. default value is `Color(0xff0217FD)`
##### rippleEffectColor:
This property takes Color value as a parameter. You can change the ripple color of segment. default value is `Colors.white`
##### selectedSegmentColor:
This property takes Color value as a parameter. You can change the selected segment color of animated segment. default value is `Colors.white`
## Guideline for contributors
Contribution towards our repository is always welcome, we request contributors to create a pull request to the develop branch only.
## Guideline to report an issue/feature request
It would be great for us if the reporter can share the below things to understand the root cause of the issue.
- Library version
- Code snippet
- Logs if applicable
- Device specification like (Manufacturer, OS version, etc)
- Screenshot/video with steps to reproduce the issue
# LICENSE!
Animated Segment is [MIT-licensed](https://github.com/Mindinventory/animated_segment/blob/master/LICENSE "MIT-licensed").
# Let us know!
We’d be really happy if you send us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.