vertical_weight_slider 2.0.0 copy "vertical_weight_slider: ^2.0.0" to clipboard
vertical_weight_slider: ^2.0.0 copied to clipboard

outdated

This package provides easy-to-use and scrollable vertical weight slider. Compatible with Android & iOS & Web.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  double weight = 0.0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Vertical Weight Slider Example"),
        centerTitle: true,
      ),
      body: Container(
        child: Column(
          children: [
            Container(
              height: 200.0,
              alignment: Alignment.center,
              child: Text(
                "$weight kg",
                style: TextStyle(fontSize: 40.0, fontWeight: FontWeight.w500),
              ),
            ),
            VerticalWeightSlider(
              maximumWeight: 200,
              initialWeight: 50,
              gradationColor: [
                Colors.grey[500],
                Colors.grey[300],
                Colors.grey[200]
              ],
              onChanged: (value) {
                setState(() {
                  weight = value;
                });
              },
            )
          ],
        ),
      ),
    );
  }
}
66
likes
0
pub points
88%
popularity

Publisher

unverified uploader

This package provides easy-to-use and scrollable vertical weight slider. Compatible with Android & iOS & Web.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on vertical_weight_slider