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

retracted

A widget which provides a new way of selecting values

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:circular_selector/circular_selector.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: 'Circular Selector Demo',
      themeMode: ThemeMode.system,
      darkTheme: ThemeData.dark(),
      home: const MyHomePage(title: 'Circular Selector Demo'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: Stack(children: [
          Container(
            decoration: const BoxDecoration(
              shape: BoxShape.circle,
            ),
            child: CircularSelector(
              onSelected: (int index) {
                if (kDebugMode) {
                  print('Selected: $index');
                }
              },
              childSize: 30.0,
              radiusDividend: 2.5,
              customOffset: Offset(
                0.0,
                AppBar().preferredSize.height,
              ),
              children: CircularSelector.getTestContainers(20, 30.0),
            ),
          ),
        ]),
      ),
    );
  }
}
0
likes
0
points
26
downloads

Publisher

verified publishermatricaldefunkt.me

Weekly Downloads

A widget which provides a new way of selecting values

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on circular_selector