v1.1.2
popup_window
顯示一個類似原生 Android 窗口的對話框,可依螢幕位置顯示。
16喜歡 20近 30 天下載30Pub 分數
平台暫無資料
一個用於顯示彈出視窗的程式庫。
{"sdk":"flutter"}^1.0.0{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
A library to display a view like window in android native.
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