如何在单击按钮以显示在下一页上时在颤动中生成随机的六 (6) 位数字?
Container(
width: MediaQuery.of(context).size.width * 3.5/4,
height: MediaQuery.of(context).size.height * 0.35/4,
child: RaisedButton(
color: Colors.indigoAccent,
textColor: cc.WHITE,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
onPressed: () {
push(context, Invite());
},
child: new Text(
'GENERATE CODE',
style: new TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
//text: 'GENERATE CODE',
),
),
Run Code Online (Sandbox Code Playgroud)