slider_controller 0.0.4 copy "slider_controller: ^0.0.4" to clipboard
slider_controller: ^0.0.4 copied to clipboard

A package that gives us a slider controller a custom widget. This widget is used for easy customization for the slider widget.

example/lib/main.dart

import 'dart:developer' as developer;

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Slider Controller',
      home: MyHomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        color: const Color(0xFF0D1835),
        padding: const EdgeInsets.all(24.0),
        alignment: Alignment.center,
        child: SliderController(
          value: 100.0,
          onChanged: (value) {
            developer.log('Slider Value : $value');
          },
          min: 50.0,
          max: 150.0,
          sliderDecoration: SliderDecoration(
            inactiveColor: const Color(0xFF1A2942),
            activeColor: const Color(0xFF2BA1C3),
            thumbColor: const Color(0xFF1E7893),
            borderRadius: 20.0,
            height: 50.0,
            isThumbVisible: true,
            thumbHeight: 25.0,
            thumbWidth: 5.0,
          ),
        ),
      ),
    );
  }
}
40
likes
160
pub points
80%
popularity

Publisher

verified publishermindinventory.com

A package that gives us a slider controller a custom widget. This widget is used for easy customization for the slider widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on slider_controller