Last updated:
0 purchases
fl score bar
FlScoreBar #
A simple flutter score bar package that can be used in 2 states. immutable is the state that can be shown to the user.
And mutable is the state that can be changed by the user action. All widgets support Rtl direction.
Usage #
First of all, you must add the package to your pubspec.yaml:
fl_score_bar: ^0.2.4
copied to clipboard
or enter this in your command line:
flutter pub add fl_score_bar
copied to clipboard
Sample #
FlScoreBar #
FlScoreBar can be added to your widget tree like this:
//immutable
FlScoreBar(
title: 'score',
maxScore: 5,
score: 4.3,
averageScoreColor: Colors.yellow,
highScoreColor: Colors.green,
lowScoreColor: Colors.red,
textStyle: TextStyle(color: Colors.black),
);
copied to clipboard
or
//mutable
FlScoreBar.editable(
title: 'score',
maxScore: 5,
score: 4.3,
averageScoreColor: Colors.yellow,
highScoreColor: Colors.green,
lowScoreColor: Colors.red,
textStyle: const TextStyle(color: Colors.black),
onChanged: (value) {
print('FlScoreBar updated value -> $value');
},
)
copied to clipboard
IconScoreBar #
IconScoreBar can be added to your widget tree like this:
IconScoreBar(
scoreIcon: Icons.star,
iconColor: Colors.amber,
score: 2.6,
maxScore: 5,
readOnly: false,
onChanged: (value) {
print('IconScoreBar updated value -> $value');
},
)
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.