bubble_slider 0.0.5 copy "bubble_slider: ^0.0.5" to clipboard
bubble_slider: ^0.0.5 copied to clipboard

This package support a slider customize UI with bubble animation. The slider value would be 0 to 100.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

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

class BubbleDemo extends StatefulWidget {
  const BubbleDemo({Key? key}) : super(key: key);

  @override
  BubbleDemoState createState() => BubbleDemoState();
}

class BubbleDemoState extends State<BubbleDemo> with TickerProviderStateMixin {
  double _value = 50.0;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'Bubble Slider',
          style: TextStyle(
              color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18),
        ),
      ),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(30.0),
          child: SizedBox(
            height: 20,
            child: BubbleSlider(
              value: _value,
              bubbleSize: BubbleSize.medium,
              thumbRadiusSpeed: ThumbRadiusSpeed.veryFast,
              bubblesSpeed: BubbleSpeed.veryFast,
              isBubbleVisible: true,
              onChanged: (val) {
                _value = val;
              },
              onChangeEnd: (s) {},
              color: Colors.blue,
            ),
          ),
        ),
      ),
    );
  }
}
18
likes
150
points
33
downloads

Publisher

verified publishermindinventory.com

Weekly Downloads

This package support a slider customize UI with bubble animation. The slider value would be 0 to 100.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bubble_slider