Giter Site home page Giter Site logo

wanglu1209 / wpopup Goto Github PK

View Code? Open in Web Editor NEW
272.0 272.0 27.0 16.29 MB

一个简单使用并且高度定制的Popupwindow。超简单实现朋友圈点赞效果,并且只用一个WPopup!完全不用担心复用问题!点击切换动画效果等!

License: Apache License 2.0

Kotlin 67.96% Java 32.04%
pop popup popup-window popupwindow

wpopup's Issues

当被包裹的widget没有设置背景色时,无法触发

应当给GestureDetector设置behavior: HitTestBehavior.opaque属性

  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: (){
        if(entry != null){
          removeOverlay();
        }
        return Future.value(true);
      },
      child: GestureDetector(
        child: widget.child,
        behavior: HitTestBehavior.opaque, 
        onTap: () {
          if (widget.pressType == PressType.singleClick) {
            onTap();
          }
        },
        onLongPress: () {
          if (widget.pressType == PressType.longPress) {
            onTap();
          }
        },
      ),
    );
  }

ListView中有时候会出现报错

WidgetsBinding.instance.addPostFrameCallback((call) {
width = context.size.width;
height = context.size.height;
button = context.findRenderObject();
overlay = Overlay.of(context).context.findRenderObject();
});

═══════ Exception caught by scheduler library ═════════════════════════════════
The getter 'size' was called on null.
Receiver: null
Tried calling: size

这个地方进入页面后开始自动滚动则会有上面的异常抛出

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.