kumi_popup_window 1.0.10

Flutter Android iOS web

A simple and easy-to-use pop-up window. There are no flashy preset templates. Everything you want to pop up is customized by you.

✨ kumi_popup_window #

pub package

[Language] English | 中文文档

A simple and easy-to-use pop-up window. There are no flashy preset templates. Everything you want to pop up is customized by you.

1.Install

dependencies:
  kumi_popup_window: ^1.0.10

2.Import

import 'package:kumi_popup_window/kumi_popup_window.dart';

3.Use

//both sowPopupWindow and createPopupWindow
showPopupWindow(
  context,
  gravity: KumiPopupGravity.rightBottom,
  bgColor: Colors.grey.withOpacity(0.5),
  clickOutDismiss: true,
  clickBackDismiss: true,
  customAnimation: false,
  customPop: false,
  customPage: false,
  //targetRenderBox: (btnKey.currentContext.findRenderObject() as RenderBox),
  //childSize: null,
  underStatusBar: false,
  underAppBar: true,
  offsetX: 0,
  offsetY: 0,
  duration: Duration(milliseconds: 200),
  onShowStart: (pop) {
    print("showStart");
  },
  onShowFinish: (pop) {
    print("showFinish");
  },
  onDismissStart: (pop) {
    print("dismissStart");
  },
  onDismissFinish: (pop) {
    print("dismissFinish");
  },
  onClickOut: (pop){
    print("onClickOut");
  },
  onClickBack: (pop){
    print("onClickBack");
  },
  childFun: (pop) {
    return Container(
      key: GlobalKey(),
      padding: EdgeInsets.all(10),
      height: 100,
      width: 100,
      color: Colors.redAccent,
    );
  },
);

4.Demo screen

Screenshot Screenshot

note Please use ValueNotifier for data update, don't use setState, usage can be Baidu, Google, or see [example] (example/lib/main.dart)

Brief description, see here for details

paramsdescriptiondefault
childFunMethod for customizing the content of the popup window. The returned widget will be used as the content of the popup windownull,(require)
gravityRelative position of the pop-up window.KumiPopupGravity.center
customAnimationCustom popupWindow animationfalse
customPopCustomize the position and animation of popupWindowfalse
customPageCustomize the entire page, including Scaffoldfalse
bgColorThe color of the mask layerColors.black.withOpacity(0.5)
targetRenderBoxRenderBox of the target widgetnull
underStatusBarWhen the top pops up, is it below the statusBarfalse
underAppBarWhen the top pops up, is it below the AppBarfalse
clickOutDismissClick outside the pop-up window to dismisstrue
clickBackDismissClick the physical back button to dismisstrue
offsetXOffset at horizontal axis edge0.0
offsetYOffset at vertical axis edge0.0
durationDuration of the animationDuration(milliseconds: 200)
isShowWhether the current popup frame is displayedfalse
onShowStartWhen the popupWindow show animation startnull
onShowEndWhen the popupWindow show animation finishnull
onDismissStartWhen the popupWindow dismiss animation startnull
onDismissEndWhen the popupWindow dismiss animation finishnull
onClickOutClick on the listener outside the popupnull
onClickBackListening on clicking the physical back buttonnull
property/methoddescription
childPopup window widget,Get its size and position by GlobalKey
controllerAnimation Controller
show()popup window show
dismiss()popup window dismiss

About #

  • QQ:876625596
  • Email:876625596@qq.com
  • Github:https://github.com/q876625596

License #

MIT License

Copyright (c) 2020 q876625596

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

8
likes
100
pub points
78%
popularity

A simple and easy-to-use pop-up window. There are no flashy preset templates. Everything you want to pop up is customized by you.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

ly876625596@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on kumi_popup_window