flutter_score_slider 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 73

Flutter Score Slider #

Simple & customizable Flutter slider widget for score selections.

How to use #

Add flutter_score_slider to your project dependencies

  flutter_score_slider: ^1.0.0

And install it using flutter packages get on your project folder. After that, just import the module and use it:

import 'package:flutter_score_slider/flutter_score_slider.dart';

// ...

  maxScore: 10,
  onScoreChanged: (newScore) {
    setState(() {
      _currentScore = newScore;

Customize colors #

flutter_score_slider supports Flutter's themes and gets its look and feel by the app's default Theme style. If you want to change the colors of the widget you can use the following parameters to set your own colors:

backgroundColorSet the background color
thumbColorSet the thumb color (Selected value)
scoreDotColorSet the score values "dots" color

Change Log #

See Change Log page.

Contribution #

Please file feature requests and bugs at the issue tracker.

Author #

Tomer Shalom

[1.0.1] #

  • Fix onScoreChanged parameter typo

[1.0.0] #

  • Initial Release


import 'package:flutter/material.dart';
import 'package:flutter_score_slider/flutter_score_slider.dart';

void main() {

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Score Slider Demo',
      theme: ThemeData.light(),
      darkTheme: ThemeData.dark(),
      home: MyHomePage(title: 'Score Slider Demo'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  int _currentScore;

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
              child: ScoreSlider(
                maxScore: 10,
                thumbColor: Colors.blue,
                scoreDotColor: Colors.white,
                onScoreChanged: (newScore) {
                  setState(() {
                    _currentScore = newScore;
              padding: EdgeInsets.only(
                left: 20,
                right: 20,
              height: 5,
              _currentScore == null
                  ? "No Score Selected"
                  : "Selected Score: $_currentScore",
                  style: Theme.of(context).textTheme.subtitle1,
      ), // This trailing comma makes auto-formatting nicer for build methods.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_score_slider: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_score_slider/flutter_score_slider.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart


  • flutter_score_slider that is a package requiring null.

Health suggestions

Format lib/flutter_score_slider.dart.

Run flutter format to format lib/flutter_score_slider.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies