小编Uro*_*ros的帖子

如何在颤振中渲染列表内的列表?

我正在创建一个 flutter 应用程序,它应该显示团队列表,每个团队都是一个包含以下项目的对象

name: 细绳

players: 数组

name: 细绳

所以看起来像这样

List teams = [
      {
        'name': 'Team one',
        'players': [
          {
            'name': 'Team one player one',
          },
          {
            'name': 'Team one player two',
          },
          {
            'name': 'Team one player three',
          },
        ]
      },
      {
        'name': 'Team two',
        'players': [
          {
            'name': 'Team two player one',
          },
          {
            'name': 'Team two player one',
          },
          {
            'name': 'Team two player three',
          },
        ]
      },
    ];
Run Code Online (Sandbox Code Playgroud)

此外,在我的代码中,我正在迭代所有teamswith ListView …

list widget dart flutter

7
推荐指数
1
解决办法
2万
查看次数

QML 字体渲染不正确 - 缺少细节

正如标题所说,我在使用 macOS 时遇到 QML 项目的字体渲染问题。

图片示例

在此处输入图片说明

字体位于assets/fonts(本地文件夹)中,并且通过FontLoader 将其添加到main.qml 中,就像其他3 种字体一样。除了这个字体之外的所有字体都正确呈现,正如您在上面的屏幕截图中看到的那样,我的系统正确读取字体。我加载的所有字体都是 .otf,我不知道这是否与我的问题有关。

预期结果:

在此处输入图片说明

我的示例 QML 代码是:

Text { 
    id: welcomeMessageTop 
    color: "blue" 
    text: "ASDFGHJKLT" 
    font.family : 
    fontLoaded.name 
    font.pixelSize: 110 
    font.letterSpacing: -0.4 
} 
Run Code Online (Sandbox Code Playgroud)

谢谢

fonts qt qml

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

github操作找不到package.json

我正在尝试设置一些基本的 GitHub 操作来对 PR 写评论。

操作发布在 github 上,如下所示:

action.yml 文件:

name: !!name!!
description: !!description!!
author: !!me!!
inputs:
  token:
    description: "Github token"
    required: true
runs:
  using: "node12"
  main: "index.js"
Run Code Online (Sandbox Code Playgroud)

index.js 文件:

const core = require("@actions/core");
const { execSync } = require("child_process");
const { GitHub, context } = require("@actions/github");

const main = async () => {
  const repoName = context.repo.repo;
  const repoOwner = context.repo.owner;
  const token = core.getInput("token");
  const testCommand = "yarn test --watchAll=false";
  const prNumber = context.payload.number;

  const githubClient = new …
Run Code Online (Sandbox Code Playgroud)

yaml github package.json github-actions

2
推荐指数
1
解决办法
1951
查看次数

标签 统计

dart ×1

flutter ×1

fonts ×1

github ×1

github-actions ×1

list ×1

package.json ×1

qml ×1

qt ×1

widget ×1

yaml ×1