W/Choreographer(11277): Frame time is 13.988632 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase.
Run Code Online (Sandbox Code Playgroud)
这是运行时产生的错误。Flutter 未更新setState内容并出现此错误,代码如下
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'dart:math';
void main() {
runApp(
MaterialApp(
home: Scaffold(
backgroundColor: Colors.redAccent,
appBar: AppBar(
backgroundColor: Colors.red,
title: Center(child: Text('Dicee')),
),
body: MyApp(),
),
),
);
}
class MyApp extends StatefulWidget {
@override
MyAppState createState() => MyAppState();
}
class MyAppState extends State<MyApp> {
int leftDiceNumber = 1;
@override
Widget build(BuildContext context) {
leftDiceNumber …Run Code Online (Sandbox Code Playgroud)