在vs代码上运行flutter应用程序时,出现此错误: lib / ui / pages / home_pages / ads_view.dart:65:39:错误:没有名为“列表”的命名参数。
from django.forms import forms
#then I change as below field:
from django import forms
这是代码:
^^^^
../../../Desktop/flutter/packages/flutter/lib/src/painting/gradient.dart:366:9: Context: Found this candidate, but the arguments don't match.
const LinearGradient({
^^^^^^^^^^^^^^
答案 0 :(得分:0)
使用colors
属性代替List
。
Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [Colors.black87, Colors.transparent], // Here it is
begin: Alignment.bottomCenter,
end: Alignment.center,
),
),
)