【问题标题】:Flutter | I want add widget in left side how?颤振 |我想在左侧添加小部件如何?
【发布时间】:2021-12-23 15:29:20
【问题描述】:

我正在使用颤振制作应用程序如何在左侧添加另一个文本小部件 (我是 Flutter 的新手)

【问题讨论】:

    标签: android ios flutter textbox alignment


    【解决方案1】:

    试试下面的答案希望它对你有帮助。您可以使用 ListTileRow Widget 参考 ListTile hereRow here

    使用ListTile

    ListTile(
      leading: CircleAvatar(),
      title: Text(
        'Make a word using letter  \'a\'',
      ),
    ),
    

    使用 ListTile 的结果屏幕 ->

    使用Row

    Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: [
        CircleAvatar(),
        Text(
          'Make a word using letter  \'a\' ',
        ),
      ],
    ),   
    

    您的结果屏幕使用 Row->

    【讨论】:

    • 非常感谢!!!!。
    • 很高兴为您提供帮助。用颤振享受你的骑行
    • 感谢您的好意
    【解决方案2】:

    使用行小部件。

      Row(  
        mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: [
        Text('Hello Flutter'),
    
        const Icon(
          Icons.schedule,
          size: 18,
          color: Colors.white54,
        ),
        const SizedBox(
          width: 4,
        ),
        const Text(
          ' min',
          style: TextStyle(
            fontSize: 11,
            color:  Color(0xfff1f1f1),
            fontWeight: FontWeight.w700,
          ),
        ),
      ],
    );
    

    【讨论】:

    • 非常感谢!!!!。
    猜你喜欢
    • 2019-02-08
    • 2021-10-12
    • 2021-06-11
    • 1970-01-01
    • 2020-10-04
    • 2021-11-24
    • 2019-04-09
    • 2021-11-25
    • 2019-02-22
    相关资源
    最近更新 更多