animated_weight_picker 1.0.3 copy "animated_weight_picker: ^1.0.3" to clipboard
animated_weight_picker: ^1.0.3 copied to clipboard

Animated Weight Picker allows to select a weight by swiping or dragging a handle along a scale.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  final double min = 0;
  final double max = 10;
  String selectedValue = '';

  @override
  void initState() {
    selectedValue = min.toString();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Animated Weight Picker'),
      ),
      body: Center(
        child: SizedBox(
          width: 500,
          child: AnimatedWeightPicker(
            min: 0,
            max: 10,
            onChange: (newValue) {
              setState(() {
                selectedValue = newValue;
              });
            },
          ),
        ),
      ),
    );
  }
}
24
likes
150
points
612
downloads

Publisher

verified publishergurutechnolabs.com

Weekly Downloads

Animated Weight Picker allows to select a weight by swiping or dragging a handle along a scale.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on animated_weight_picker