【发布时间】:2023-02-03 16:08:41
【问题描述】:
这里 CuButton 显示错误。我还创建了相同的小部件但没有显示错误但在这种情况下它显示错误
` 小部件 CuBUtton({
String name = "button",
Color color = Colors.blueGrey,
double H = 10,
double W = 10,
required Function function,
required TextStyle Labelstyl}) {
try {
return
InkWell(onTap: () {
function();
},
child: Container(color: color,
height: H, width: W,
child: Center(child:
Text(name,style: Labelstyl,)),),
);
} catch (e) {
print("Error on Button $e");
}
}`
【问题讨论】: