Flutter

Flutter - 仿微信右上角pop弹框封装 - JhPopM

2020-08-17  本文已影响0人  西半球_

demo 地址: https://github.com/iotjin/jh_flutter_demo

效果图:

JhPopMenus1.jpg JhPopMenus3.jpg JhPopMenus2.jpg

Examples

    // 带分割线不带背景
    JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
      print('选中index: ${index}');
      print('选中text: ${selText}');

      if (selText == '扫一扫') {
        // 延时执行
        Future.delayed(Duration(milliseconds: 400), () {
          JhQrCodeUtils.scan().then((value) => () {
                print(value);
              });
        });
      }
    });

   JhPopMenus.show(context, clickCallback: (index, selText) {
     print('选中index: ${index}');
     print('选中text: ${selText}');
   });

    JhPopMenus.showLinePop(context, isShowBg: true,
       clickCallback: (index, selText) {
     print('选中index: ${index}');
     print('选中text: ${selText}');
    });
上一篇 下一篇

猜你喜欢

热点阅读