Search packages, repositories and app categories

Package detailsv1.1.2

popup_window

Display A Dialog like Android Native Window, which can display by position in screen.

30-day downloads
19
Likes
16
Pub points
30

Install package

flutter pub add popup_window

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

PopupWindow is a Flutter package that enables displaying dialog-like popups positioned precisely on the screen, mimicking Android's native window behavior. It provides a flexible way to show content at specific coordinates, ideal for context menus, tooltips, or custom overlays. The package supports dynamic positioning and integrates smoothly with existing Flutter widgets. It is lightweight and focused solely on popup display functionality without additional dependencies. Designed for developers seeking native-like popup experiences in Flutter apps.

Use cases

  • Displaying context menus
  • Creating tooltips
  • Showing custom overlays
  • Implementing floating action popups
  • Building interactive UI elements

Key features

  • Position-based popup placement
  • Android-native style appearance
  • Lightweight and minimal dependencies
  • Supports dynamic positioning
  • Easy integration with Flutter widgets

Suitable for

  • Developers needing precise popup positioning
  • Apps requiring native-like dialog behavior
  • UI components with floating elements
  • Custom overlay implementations
  • Cross-platform apps with Android-style dialogs

Considerations

  • Limited to screen-positioned displays
  • No built-in animations
  • Requires manual handling of dismiss logic
  • Not suitable for complex dialog workflows
  • Depends on correct coordinate management

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

popup_window

Screenshot

A library to display a view like window in android native.

Getting Started

1.Install

dependencies:
  popup_window: ^1.1.2

2.Import

import 'package:popup_window/popup_window.dart';

3.Usage


/// call directly
showWindow<T>(
        context: context,
        position: position, /// RelativeRect
        duration: widget.duration,
        windowBuilder: widget.windowBuilder,
        onWindowShow: widget.onWindowShow,
        onWindowDismiss: widget.onWindowDismiss);

or

/// windowHeigh = 200;
PopupWindowButton(
  offset: Offset(0, windowHeight),
  buttonBuilder: (BuildContext context) {
    return PopupWindowBtn();
  },
  windowBuilder: (BuildContext context, Animation<double> animation,
     Animation<double> secondaryAnimation) {
    return FadeTransition(
      opacity: animation,
      child: SizeTransition(
        sizeFactor: animation,
        child: Container(
          color: Colors.greenAccent,
          height: windowHeight,
        ),
      ),
    );
  },
  onWindowShow: () {
    print('PopupWindowButton window show');
  },
  onWindowDismiss: () {
     print('PopupWindowButton window dismiss');
  },
)

More detail see example: main.dart

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.