roll_dice_2d 1.0.2 copy "roll_dice_2d: ^1.0.2" to clipboard
roll_dice_2d: ^1.0.2 copied to clipboard

A roll dice 2D package.

example/lib/main.dart

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

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

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: RollDice2D(
            rollingTimes: 3000, // Number of times to roll the dice
            color: DiceColor.red,
            onRoll: (value) {
              debugPrint('Rolled value: $value');
            },
          ),
        ),
      ),
    );
  }
}
1
likes
150
points
51
downloads

Publisher

verified publisherarthurmonteiro.com

Weekly Downloads

A roll dice 2D package.

Repository (GitHub)
View/report issues

Topics

#dice #game

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on roll_dice_2d