Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

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

Open
@dinkar1708

Description

@dinkar1708

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,
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions