v1.1.2
popup_window
Android 네이티브 창과 유사한 대화 상자를 표시하며 화면 위치에 따라 표시할 수 있습니다.
16좋아요 2030일 다운로드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