Placing int inside built function don’t change image of dice , but when move it to above @override it works , dice image change .Why?

import ‘dart:math’; import ‘package:flutter/material.dart’; void main() { return runApp( MaterialApp( home: Scaffold( backgroundColor: Colors.red, appBar: AppBar( title: Text(‘Dicee’), backgroundColor: Colors.red, ), body: DicePage(), ), ), ); } class DicePage extends StatefulWidget { @override _DicePageState createState() => _DicePageState(); } class _DicePageState extends State<DicePage> { int leftDice = 1; @override Widget build(BuildContext context) { return Center( child:…

Details