Flutter fluid slider - A fluid design slider that works just like the Slider material widget

Overview

Fluid Slider for Flutter

Awesome Flutter

Inspired by a dribbble by Virgil Pana.

demo

A fluid design slider that works just like the Slider material widget.

Used to select from a range of values.

Installation

Just add the package to your dependencies in the pubspec.yaml file:

dependencies:
  flutter_fluid_slider: ^1.0.2

Basic Usage

Place the FluidSlider in your widget tree.

FluidSlider(
  value: _value,
  onChanged: (double newValue) {
    setState(() {
      _value = newValue;
    });
  },
  min: 0.0,
  max: 100.0,
),

Properties

  • value : [Required] The currently selected value for this slider. The slider's thumb is drawn at a position that corresponds to this value.

  • min : The minimum value the user can select. Defaults to 0.0. Must be less than or equal to max.

  • max : The maximum value the user can select. Defaults to 1.0. Must be less than or equal to min.

  • start : The widget to be displayed as the min label. For eg: an Icon can be displayed. If not provided the min value is displayed as text.

  • end : The widget to be displayed as the max label. For eg: an Icon can be displayed. If not provided the max value is displayed as text.

  • onChanged : [Required] Called during a drag when the user is selecting a new value for the slider

    by dragging.

    • The slider passes the new value to the callback but does not actually change state until the parent widget rebuilds the slider with the new value.

    • If null, the slider will be displayed as disabled.

  • onChangeStart : Called when the user starts selecting a new value for the slider. The value passed will be the last value that the slider had before the change began.

  • onChangeEnd : Called when the user is done selecting a new value for the slider.

  • labelsTextStyle : The styling of the min and max text that gets displayed on the slider. If not provided the ancestor Theme's accentTextTheme text style will be applied.

  • valueTextStyle : The styling of the current value text that gets displayed on the slider. If not provided the ancestor Theme's textTheme.title text style with bold will be applied .

  • sliderColor : The color of the slider. If not provided the ancestor Theme's primaryColor will be applied.

  • thumbColor : The color of the thumb. If not provided the Colors.white will be applied.

  • showDecimalValue : Whether to display the first decimal value of the slider value. Defaults to false.

  • mapValueToString : called with value for the String to be rendered in the slider's thumb. E.g. display roman integers as follows:

    FluidSlider(
      value:_val,
      min:1.0,
      max:5.0,
      onChanged:(){},
      mapValueToString: (double value){
        List<String> romanNumerals=['I', 'II', 'III', 'IV', 'V'];
        return _romanNumerals[value.toInt() - 1];
      }
    )

    See example. If null the value is converted to String based on [showDecimalValue].

Credits:

You might also like...

Bubbleslider - A flutter package support a slider customize UI with bubble animation

Bubbleslider - A flutter package support a slider customize UI with bubble animation

bubble_slider This package support a slider customize UI with bubble animation.

Jul 26, 2022

Flutter tinder like cards

Flutter tinder like cards

TCard Tinder like cards. TCard Install Usage Normal widget Network image Use a controller to control Determine the sliding direction Reset with new ca

Dec 9, 2022

PageIndicator like Instagram written for Flutter

PageIndicator like Instagram written for Flutter

scrolling_page_indicator View page indicator like Instagram Getting Started Dependency dependencies: scrolling_page_indicator: ^0.1.2 Install flutte

Nov 4, 2022

A reactive key-value store for Flutter projects. Like shared_preferences, but with Streams.

streaming_shared_preferences A reactive key-value store for Flutter projects. streaming_shared_preferences adds reactive functionality on top of share

Dec 22, 2022

A Flutter package to custom splash screen like change logo icon, logo animation, and splash screen background color.

A Flutter package to custom splash screen like change logo icon, logo animation, and splash screen background color.

Custom Splash Screen A Flutter package to custom splash screen: change logo icon, logo animation, and splash screen background color. (Custom from ani

Sep 6, 2022

Widgets for creating Hero-like animations between two widgets within the same screen.

Widgets for creating Hero-like animations between two widgets within the same screen.

flutter_sidekick Widgets for creating Hero-like animations between two widgets within the same screen. Features Hero-like animations. Allow you to spe

Oct 21, 2022

A Flutter widget that easily adds the flipping animation to any widget

A Flutter widget that easily adds the flipping animation to any widget

flip_card A component that provides a flip card animation. It could be used for hiding and showing details of a product. How to use import 'package:fl

Dec 31, 2022

A widget that allow user resize the widget with drag

Flutter-Resizable-Widget A widget that allow user resize the widget with drag Note: this widget uses Getx Example bandicam.2021-11-11.12-34-41-056.mp4

Dec 13, 2022

Best 6 Flutter Login Screen Design

Best 6 Flutter Login Screen Design

Flutter Login Home Animation A new open-source Flutter project that enables the developer to quickly get started with the Flutter animation and applic

Dec 28, 2022
Owner
Jay Raj
I make things look simple...
Jay Raj
Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's heart when you like something and animation effects to increase like count.

like_button Language: English | 中文简体 Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's h

FlutterCandies 357 Dec 27, 2022
☀️ A Flutter package for some material design app intro screens with some cool animations.

IntroViews is inspired by Paper Onboarding and developed with love from scratch. Checkout our fully responsive live example app. Table of contents Fea

Ayush Agarwal 652 Dec 30, 2022
A Flutter package for easily implementing Material Design navigation transitions.

Morpheus A Flutter package for easily implementing Material Design navigation transitions. Examples Parent-child transition You can use MorpheusPageRo

Sander R. D. Larsen 186 Jan 7, 2023
Domain-Driven Design + Parse Server For FlutterDomain-Driven Design + Parse Server For Flutter

Domain-Driven Design + Parse Server Install Parse SDK on Flutter project and then update .env file PARSE_APPLICATION_ID=YOUR_APP_ID_HERE PARSE_CLIENT_

Long Hoàng 19 Nov 18, 2022
Beautiful-Login-Design - A design challenge made in flutter + custompainter

Login Design This little project was proposed in [Flutter & Dart en Español] gro

Juan Suarez 10 Nov 3, 2022
A collection of Screens and attractive UIs built with Flutter ready to be used in your applications. No external libraries are used. Just download, add to your project and use.

Flutter Screens A collection of Login Screens, Buttons, Loaders and Widgets with attractive UIs, built with Flutter, ready to be used in your applicat

Samarth Agarwal 5k Dec 31, 2022
✨ Recognize all contributors, not just the ones who push code ✨

Call for translators! We're looking for translators to help translate this spec for everyone! Read this documentation in the following languages 한국어 中

All Contributors 6.8k Jan 4, 2023
Simple and configurable app introduction slider for Flutter

FLUTTER INTRO SLIDER Flutter Intro Slider is a flutter plugin that helps you make a cool intro for your app. Create intro has never been easier and fa

Duy Tran 623 Jan 7, 2023
A custom Flutter value slider that makes a wave effect when dragged.

A Flutter slider that makes a wave effect when dragged. Does a little bounce when dropped. Demo Getting Started To use this plugin, add wave_slider as

Gordon Hayes 33 Dec 21, 2022
Sample Flutter Drawing App which allows the user to draw onto the canvas along with color picker and brush thickness slider.

DrawApp Sample Flutter Drawing App which allows the user to draw onto the canvas along with color picker and brush thickness slider. All code free to

Jake Gough 226 Nov 3, 2022