そこで、コースの特定の情報を保持するカードを作成しました。これは、LinearProgressIndicator を使用して完了したコースのパーセンテージを示します。
Widget top(BuildContext context) {
return Row(
children: <Widget>[
Image.network(
image,
height: 100,
width: 100,
),
SizedBox(
width: 16,
),
Flexible(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(checkTitle(title),
style: Theme.of(context).textTheme.headline3),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.5,
child: LinearProgressIndicator(
value: int.parse(progress) * 0.01,
valueColor: AlwaysStoppedAnimation<Color>(LightSeaGreen),
backgroundColor: Colors.greenAccent,
// (int.parse(progress)).roundToDouble(),
),
),
Text('$progress%')
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Text(startDate), Text(finishDate)],
),
],
)),
],
);
}
私の出力、 ここに画像の説明を入力してください
しかし、画面の幅を変更すると、このエラー が発生し、ここに画像の説明を入力してください
私が欲しいのは、 LinearProgressIndicator が画面幅に応じて応答することです.助けてください!!!