【问题标题】:How to fit banner widget with its parent?如何将横幅小部件与其父级相匹配?
【发布时间】:2021-03-13 10:31:57
【问题描述】:

我的父母是一个容器,里面有一张卡片。

我想将我的横幅放在左上角的卡片视图中。

Container(
child :Card(
child:Banner(
message: 'hello',
location: BannerLocation.topEnd,
child:myWidget()
)
)
)

【问题讨论】:

    标签: android ios flutter user-interface banner


    【解决方案1】:

    用 ClipRect 包裹你的横幅小部件

    ClipRect(
              child: Banner(
                message: "hello",
               )
    )
    

    【讨论】:

      猜你喜欢
      • 2019-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-10
      • 2015-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多