📜  在同一行上颤动 2 个输入装饰 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:13.740000             🧑  作者: Mango

代码示例1
// This worked for me... Also can replace Expanded with Flexible see:
// https://stackoverflow.com/questions/52645944/flutter-expanded-vs-flexible

Row(
  children: [
    Expanded(
      child: Row(
        children: [
          Expanded(
            flex: 3,
            child: TextField(
              decoration: InputDecoration(
                  hintText: 'Time'),
            ),
          ),
          Expanded(
            flex: 4,
            child: Text("(in mins)/"),
          ),
        ],
      ),
    ),
    Expanded(
      child: Row(
        children: [
          Expanded(
            flex: 3,
            child: TextField(
              decoration: InputDecoration(
                  hintText: 'Whistle'),
            ),
          ),
          Expanded(
            flex: 4,
            child: Text("(whistles)"),
          ),
        ],
      ),
    ),
  ],
),