sexyslider 1.0.0 icon indicating copy to clipboard operation
sexyslider: ^1.0.0 copied to clipboard

A simple package to get a sexy slider.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  late double sliderValue;

  @override
  void initState() {
    sliderValue = 0.0;

    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Stack(
          alignment: Alignment.center,
          children: [
            SexySlider(
              value: sliderValue,
              minValue: 0,
              maxValue: 100,
              onChanged: (value) {
                setState(() {
                  sliderValue = value;
                });
              },
              decoration: SexySliderDecoration(
                width: 200,
                height: 600,
                backgroundColor: Colors.black,
                valueColor: Colors.green,
                borderRadius: BorderRadius.circular(45),
              ),
            ),
            Text(sliderValue.toString(), style: TextStyle(color: Colors.white))
          ],
        ),
      ),
    );
  }
}
2
likes
110
pub points
0%
popularity

Publisher

verified publisher iconjackslattery.org

A simple package to get a sexy slider.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on sexyslider