FLUTTER ECOSYSTEM

owczaro/o_popup

뒤로 버튼을 누르면 열린 위치나 포인터가 화면에 접촉한 위치로 자동으로 닫히는 오버레이 콘텐츠입니다. 즉, 팝업은 탭 제스처를 지원합니다!

o_popup 프로젝트 이미지
Stars
2
Forks
0
최근 푸시(UTC)
2021. 9. 5.
프로젝트 상태
활성
Łukasz Owczarczuk GitHub avatar
GITHUB User

Łukasz Owczarczuk ↗

By working week, I'm a software engineer, but in my spare time, I'm a mountain freak, biker, traveler, scuba diver, skydiver and motorboat helmsman

Poland
언어DartObjective-CJava

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • effective_dart개발 의존성^1.3.2
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

License: MIT style: effective dart Travis CI


Description

An overlaid content, which closes itself into opening place (on back button) or into the position where the pointer contacted the screen. It means, popup supports tap gesture!

https://raw.githubusercontent.com/owczaro/o_popup/master/example/o_popup_demo.gif

Implementation

First of all, you need to install the package.

The second step is to create a popup. I recommend to use OPopupTrigger class in order to simply create the popup as in the example. It pushes OPopupOverlay widget into Navigation stack, thus a user can dismiss the popup by back button or by tapping anywhere on a screen. In the OPopupTrigger class you can also set barrierDismissible to false (to prevent dismissing popup by taping anywhere) and for example create a button, which pops the popup from Navigator stack (Navigator.of(context).pop()) in order to close the popup - like buttons in the example.

Customization

If you do not want to use OPopupContent class as a content of a popup triggered by OPopupTrigger you should skip popupHeader and popupActionRow fields and set your own widget to popupContent field. It gives you an ability to fully customize the content of the popup: size, alignment etc.

You can also overwrite OPopupContent (create a class which extends OPopupContent), customize it inside your own class and set your version of OPopupContent to OPopupTrigger.popupContent (also do not set popupHeader and popupActionRow in order to omit original OPopupContent).

Documentation

Extended documentation is available on pub.dev.

Commercial Use

If you use this code in commercial project, please donate me via GitHub Sponsors. I do the same for packages which I use, because it ensures stable development for all of us!