【发布时间】:2020-04-15 10:00:01
【问题描述】:
当我使用这个库为 RaisedButton 添加自定义颜色时 https://pub.dev/packages/color
return new Padding(
padding: EdgeInsets.fromLTRB(10.0, 180.0, 10.0, 0.0),
child: SizedBox(
height: 60.0,
child: new RaisedButton(
elevation: 5.0,
// color: Colors.greenAccent[100],
color:rgbColor,
// color: Color(0xffFF1744),
child: new Text( 'Sign in',
style: new TextStyle(fontSize: 20.0,color:Colors.black,fontWeight:FontWeight.w400)),
onPressed: () => {
},
)
它给了我这个错误
The argument type 'Color (where Color is defined in /Users/abeer/flutter/.pub-cache/hosted/pub.dartlang.org/color-2.1.1/lib/color.dart)' can't be assigned to the parameter type 'Color (where Color is defined in /Users/abeer/flutter/bin/cache/pkg/sky_engine/lib/ui/painting.dart)
【问题讨论】:
标签: flutter