Roll Dicer is a simple Flutter application designed to practice the basics of Flutter development. The app simulates a dice roll, generating a random number between 1 and 6, and displays the corresponding dice image.
- Random dice roll functionality.
- Dynamic dice image update based on the rolled number.
- Gradient background for aesthetic appearance.
- Simple and clean user interface.
The application consists of the following components:
The entry point of the application. It initializes the app with a GradientContainer
widget inside a Scaffold
.
A stateless widget that creates a gradient background and centers the DiceRoller
widget.
A stateful widget that handles the dice roll logic and updates the dice image dynamically. It uses Flutter's setState
to re-render the UI when a new dice number is generated.
A reusable stateless widget for styled text. Used for the "Roll Dice" button text.