flutter - 在 PWA 颤振中创建自定义颜色
问题描述
嗨,我正在尝试从我现有的颤振应用程序项目构建 PWA ......在我的颤振应用程序中,我正在使用我在文件中定义的自定义颜色.. 就是这样
import 'package:flutter/material.dart';
const first= Color(0xxxxxxxxxxxx);
const second= Color(0xxxxxxxxx);
const third= Color(0xxxxxxxx);
const vio= LinearGradient( // I get red line here
colors: <Color>[first, second, third], // from this line I get red line with note: The named parameter 'colors' isn't defined.
stops: [0.2, 0.5, 1.3],// same goes for this line
begin: Alignment.centerLeft,
end: Alignment.centerRight,
);
我正在通过将该文件添加到我的 PWA 项目中进行试验,但是始终无法定义colors
and ......从这种情况下,我应该在我的 PWA 项目的文件夹中添加一些东西吗?stops
web
解决方案
推荐阅读
- python - PyCharm reporting no module found but when I go to look for it then it's there in the correct directory
- excel - 修改一个 VBA 代码,将 sumifs 拖到大量的行和列中
- python - pyodbc.connect 在使用本地服务器时无法使用 aws db 实例
- reactjs - 注销时无法关闭套接字
- sql-server - 选择最大值(convert(datetime2(0),DATEFROMPARTS(1998,05,30)) > GETDATE() -1 然后 'Y' else 'N' end 时的情况)
- css - CSS Progress Stepper 在第一步不工作
- javascript - 如何引用引导类名称属性?
- javascript - mysql-xdevapi getCollections 承诺返回值
- mysql - 在 MYSQL 中插入新数据集后发送邮件
- java - Spring OIDC – 在解析“iss”声明时,无法将“class java.lang.String”类型的声明“iss”转换为 URL。