roulette_widget 1.0.1 copy "roulette_widget: ^1.0.1" to clipboard
roulette_widget: ^1.0.1 copied to clipboard

outdated

A simple customizable roulette widget that you only have to pass the options to be showed.

example/main.dart

import 'package:flutter/material.dart';

import 'package:roulette_widget/roulette_widget.dart';

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

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

  @override
  Widget build(BuildContext context) {
    const double heightIndicator = 30;
    const double widthIndicator = 30;
    const double widthRoulette = 200;

    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        body: SafeArea(
          child: Padding(
            padding: const EdgeInsets.all(10.0),
            child: Column(
              children: [
                RouletteWidget(
                  widthRoulette: widthRoulette,
                  widthIndicator: widthIndicator,
                  heightIndicator: heightIndicator,
                  options: [
                    RouletteElementModel(text: 'Option 1', color: Colors.red),
                    RouletteElementModel(text: 'Option 2', color: Colors.blue),
                    RouletteElementModel(
                        text: 'Option 3', color: Colors.orange),
                    RouletteElementModel(text: 'Option 4', color: Colors.green),
                    RouletteElementModel(
                        text: 'Option 5', color: Colors.yellow),
                  ],
                ),
                const Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Icon(
                      Icons.info,
                      color: Colors.blueAccent,
                    ),
                    Text(
                      'Tap or Drag to Spin',
                      style: TextStyle(
                          fontWeight: FontWeight.w500,
                          color: Colors.blueAccent),
                    ),
                  ],
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
0
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

A simple customizable roulette widget that you only have to pass the options to be showed.

Homepage

License

unknown (license)

Dependencies

animate_do, flutter

More

Packages that depend on roulette_widget