Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pip view get call back(onTapTopWidget) when close the floating view to caller widget #8

Open
dinkar1708 opened this issue Jul 15, 2022 · 0 comments · May be fixed by #12
Open

Comments

@dinkar1708
Copy link

What - Using pip view get call back(onTapTopWidget) when close the floating view to caller widget
Why - Many times i want to perform my own action when closed the floating view.

Optional solution - of course i can directly use the RawPIPView but i want to use directly PIPView.

Can we modify this PIPView ->

return PIPView(
      builder: (context, isFloating) {

When use PIPView like above can we add a function which returns the call back(onTapTopWidget) when pip view floating view is closed?

get call back
onTapTopWidget : () {}, // modification i want here

  return PIPView(
       **onTapTopWidget : () {},** // modification i want here
      builder: (context, isFloating) {

pip_view.dar library build function line line 47 to 71

modify this
onTapTopWidget: isFloating ? stopFloating : null, from here return call back

return RawPIPView(
      avoidKeyboard: widget.avoidKeyboard,
      bottomWidget: isFloating
          ? Navigator(
              onGenerateInitialRoutes: (navigator, initialRoute) => [
                MaterialPageRoute(builder: (context) => _bottomWidget!),
              ],
            )
          : null,
      **onTapTopWidget: isFloating ? stopFloating : null, from here return call back**
      topWidget: IgnorePointer(
        ignoring: isFloating,
        child: Builder(
          builder: (context) => widget.builder(context, isFloating),
        ),
      ),
      floatingHeight: widget.floatingHeight,
      floatingWidth: widget.floatingWidth,
      initialCorner: widget.initialCorner,
    );
@ousvat ousvat linked a pull request Nov 1, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant