小编Gok*_*dar的帖子

如何修复颤振中的“表格包含不规则的行长度”?

当我尝试使用flutter_html: 1.0.0插件从html显示表格时,我收到表格包含不规则行长度错误。如何解决这个问题?

dart flutter

8
推荐指数
1
解决办法
803
查看次数

Flutter String 到 Icon 值

如何在 Flutter 中将 String 值转换为 Icons 值,我从 json 获取 Icon 值作为字符串。

当我尝试使用该值时出现以下错误

error: The argument type 'String' can't be assigned to the parameter type 'IconData'. (argument_type_not_assignable at [hippo] lib\screens\dynamic_list.dart:71)
Run Code Online (Sandbox Code Playgroud)
{
  "page": 1,
  "MenuItems": [
    {
      "id": 419701,
      "icon": "MdiIcons.account",
      "name": "account"
    },
    {
      "id": 419702,
      "icon": "MdiIcons.currencyUsd",
      "name": "Funds"
    },
    {
      "id": 419703,
      "icon": "MdiIcons.home",
      "name": "home"
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

flutter

6
推荐指数
2
解决办法
7785
查看次数

如何将渐变与 Flutter ThemeData backgroundColor 属性一起使用?

是否可以在flutter ThemeData的backgroundColor属性中设置渐变颜色而不是单一颜色?

final ThemeData base = ThemeData.light();
return base.copyWith(
  visualDensity: VisualDensity.adaptivePlatformDensity,
  textTheme: _texttheme(base.textTheme),
  buttonTheme: _buttonTheme(base.buttonTheme),
  inputDecorationTheme: _inputDecorationTheme(base.inputDecorationTheme),
  bottomAppBarTheme: _bottomAppBarTheme(base.bottomAppBarTheme),

  backgroundColor: Colors.blueGrey // gradient color instead of single color
);
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

dart flutter

3
推荐指数
1
解决办法
2440
查看次数

标签 统计

flutter ×3

dart ×2