ios_control_center_slider 0.0.2 copy "ios_control_center_slider: ^0.0.2" to clipboard
ios_control_center_slider: ^0.0.2 copied to clipboard

An iOS Control Center–style vertical slider widget for Flutter.

example/lib/main.dart

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

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  double _currentValue = 5.0;

  void _handleSliderChange(double value) {
    setState(() {
      _currentValue = value;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Ios Control Center Slider Demo',
      theme: ThemeData(primarySwatch: Colors.blue, useMaterial3: true),
      home: Scaffold(
        backgroundColor: Colors.grey,
        body: Center(
          child: Column(
            children: [
              SizedBox(height: 100),
              Text('Current Value: ${_currentValue.toStringAsFixed(1)}'),
              SizedBox(height: 20),
              IosControlCenterSlider(
                currentValue: 5.0,
                name: 'Volume',
                onChanged: _handleSliderChange,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
160
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

An iOS Control Center–style vertical slider widget for Flutter.

Repository (GitHub)
View/report issues

Topics

#flutter #widget #utils

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ios_control_center_slider