FLUTTER ECOSYSTEM

wilin52/popup_window

一個用於顯示彈出視窗的程式庫。

popup_window 專案封面
Stars
35
Forks
43
最近推送(UTC)
2021年4月30日
專案狀態
未封存
wilin GitHub avatar
GITHUB User

wilin ↗

Android developer. email: wilin52@163.com 内推 北京快手职位,感兴趣的发我简历

Kwai co. ltdShenzhen, China
語言DartObjective-CKotlinShell

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • cupertino_icons^1.0.0
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

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