我嘗試使用我已經用一行創建的串列,但我一直收到這個錯誤 lib/main.dart:94:21: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<Widget>'.
- 'List' is from 'dart:core'.
- 'Widget' is from 'package:flutter/src/widgets/framework.dart'
('/C:/fluttersdk/flutter/packages/flutter/lib/src/widgets/framework.dart').
children: scoreKeeper,
將串列與我的行一起使用
創建串列
uj5u.com熱心網友回復:
使您的scoreKeeper變數成為型別,List<Widget>而不僅僅是List
uj5u.com熱心網友回復:
在 main.dart 中將 list 定義為 List scoreKeeper。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/337374.html
