operation_tips 0.1.0 copy "operation_tips: ^0.1.0" to clipboard
operation_tips: ^0.1.0 copied to clipboard

Flutter operation tips.Flutter 长按弹出,操作提示.

operation_tips #

Flutter operation tips.Flutter 长按弹出,操作提示.

Getting Started #

dependencies:
  operation_tips: ^0.1.0

Example #

simple.

OperationTips(
  onTap: () {
    onTap('Center');
  },
  title: "Title",
  child: Container(
    width: 100,
    height: 100,
    color: Colors.red,
    alignment: Alignment.center,
    child: Text("Center"),
  ),
),

Use OperationTipsController

class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin{
  OperationTipsController controller;

  @override
    void initState() {
      super.initState();
      controller = OperationTipsController(
        vsync: this,
        direction: TipsDirection.top,
        delegate: DefaultTipsBubbleDelegate(
          color: Colors.blue,
          child: Padding(
            padding: const EdgeInsets.all(8.0),
            child: Text(
              "Hello world",
              style: TextStyle(color: Colors.white),
            ),
          ),
          onTap: () => onTap('Top'),
        ),
      );
  }

  build() {
    ...
    OperationTips(
          operationTipsController: controller,
          onTap: () {
            print("onTap");
          },
          child: Container(
            width: 100,
            height: 100,
            color: Colors.red,
            alignment: Alignment.center,
            child: Text(text),
          ),
        )
    ...
  }
}

demo.jpg

2
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Flutter operation tips.Flutter 长按弹出,操作提示.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on operation_tips