GitHub

    Table of contents

  1. 示例
  2. 相关链接

Banner

Edit this page

Displays a diagonal message above the corner of another widget.

示例

Center(
  child: Container(
    margin: const EdgeInsets.all(10.0),
    color: Colors.yellow,
    height: 100,
    child: ClipRect(
      child: Banner(
        message: "hello",
        location: BannerLocation.topEnd,
        color: Colors.red,
        child: Container(
          color: Colors.yellow,
          height: 100,
          child: Center(
            child: Text("Hello, banner!"),
          ),
        ),
      ),
    ),
  ),
)

相关链接