Skip to content
pubscout

vertical_weight_slider

2.6.0, released 3 years ago by an unverified publisher

An easy-to-use and scrollable vertical weight slider for Flutter apps.

WASM-ready
$ flutter pub add vertical_weight_slider
Source repository

What it does

Provides a scrollable vertical slider widget specifically designed for selecting weight values. Includes a controller to manage the initial weight, minimum weight, and intervals, as well as customizable decorations.

AI-written summary of version 2.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a dedicated vertical slider UI component for picking weight or similar measurements.
  • You want support for Android, iOS, and Web platforms out of the box.

Skip it when

  • You need a standard horizontal slider component.
  • You require a complex form builder integration rather than a standalone UI widget.

Strengths

  • Scrollable vertical interface optimized for weight input.
  • Supports customizable pointer decoration and indicators.
  • Compatible with Android, iOS, and Web.

Weaknesses

  • Very narrow and specialized scope of functionality.
  • Limited built-in layout features beyond its primary use case.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

not documented

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

void main() {
  runApp(const MaterialApp(home: MyApp()));
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  late WeightSliderController _controller;
  double _weight = 30.0;

  @override
  void initState() {
    super.initState();
    _controller = WeightSliderController(initialWeight: _weight, minWeight: 0, interval: 0.1);
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: VerticalWeightSlider(
        controller: _controller,
        onChanged: (double value) {
          setState(() {
            _weight = value;
          });
        },
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace vertical_weight_slider.