Viewing version 0.0.5. Open the latest package page.
popover
0.0.5A popover is a transient view that appears above other content onscreen when you tap a control or in an area.
Readme
Content
Features
A popover is a transient view that appears above other content onscreen when you tap a control or in an area. Typically, a popover includes an arrow pointing to the location from which it emerged. Popovers can be nonmodal or modal. A nonmodal popover is dismissed by tapping another part of the screen or a button on the popover. A modal popover is dismissed by tapping a Cancel or other button on the popover.
Source: Human Interface Guidelines.
Requirements
- Dart: 2.9.0+
- Flutter : 1.17.5+
Install
dependencies:
popover: ^0.0.5
Example
See example/lib/main.dart.
import 'package:flutter/material.dart';
import 'package:popover/popover.dart';
class PopoverItems extends StatelessWidget {
const PopoverItems({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Popover(
direction: PopoverDirection.top,
width: 200,
arrowHeight: 15,
arrowWidth: 30,
child: GestureDetector(
onTap: () => print('GestureDetector onTap'),
child: Container(
width: 80,
height: 40,
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(5)),
boxShadow: [BoxShadow(color: Colors.black26, blurRadius: 5)],
),
child: const Center(child: Text('Click Me')),
),
),
bodyBuilder: (context) {
return Scrollbar(
child: Padding(
padding: const EdgeInsets.only(top: 8, bottom: 8),
child: ListView(
padding: const EdgeInsets.all(8),
children: [
InkWell(
onTap: () => Navigator.of(context).pop(),
child: Container(
height: 50,
color: Colors.amber[100],
child: const Center(child: Text('Entry A')),
),
),
const Divider(),
Container(
height: 50,
color: Colors.amber[200],
child: const Center(child: Text('Entry B')),
),
const Divider(),
Container(
height: 50,
color: Colors.amber[300],
child: const Center(child: Text('Entry C')),
),
],
),
),
);
},
);
}
}
To see examples of the following package on a device or simulator:
cd example && flutter run
Support
Post issues and feature requests on the GitHub issue tracker.
License
The source code of Popover project is available under the MIT license. See the LICENSE file for more info.
Changelog
[0.0.5] - 08.02.2021.
- Add
Key key,barrierDismissibleandshowPopover.
[0.0.4] - 27.01.2021.
- Add
arrowDyOffset,arrowDxOffsetandcontentDyOffsetpublic parameters.
[0.0.3] - 21.01.2021.
- A
childwidget can be wrapped inInkWellorGestureDetector.
[0.0.2] - 18.01.2021.
- Update
PopoverItem. - Add
PopoverDirectionto exports. - Add documentation.
[0.0.1] - 10.01.2021.
- Initial release.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'popover:0.0.5'pubspec.yaml
name: popover
description: A popover is a transient view that appears above other content onscreen when you tap a control or in an area.
version: 0.0.5
homepage: https://github.com/minikin/popover
environment:
sdk: ">=2.9.0 <3.0.0"
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.1 | Cached · Upstream SHA-256 matched | Download | 88b01eda…bf5273 |
| 0.0.2 | Cached · Upstream SHA-256 matched | Download | 9d6da05b…208a73 |
| 0.0.3 | Cached · Upstream SHA-256 matched | Download | 75ec1dcf…f85d1b |
| 0.0.4 | Cached · Upstream SHA-256 matched | Download | 8c08d042…4752cf |
| 0.0.5 | Cached · Upstream SHA-256 matched | Download | 092ea635…f05a8f |
| 0.1.0 | Cached · Upstream SHA-256 matched | Download | ecd0913b…e14e10 |
| 0.2.0 | Cached · Upstream SHA-256 matched | Download | ddc74c59…95811d |
| 0.2.1 | Cached · Upstream SHA-256 matched | Download | c0e7ba46…655291 |
| 0.2.2 | Cached · Upstream SHA-256 matched | Download | 07285f1e…5b800f |
| 0.2.3 | Cached · Upstream SHA-256 matched | Download | 086d8b1a…2a1301 |
| 0.2.4 | Cached · Upstream SHA-256 matched | Download | d48bb7a4…2234a1 |
| 0.2.5 | Cached · Upstream SHA-256 matched | Download | fed0248e…d020e1 |
| 0.2.6 | Cached · Upstream SHA-256 matched | Download | 379b0957…33ccc6 |
| 0.2.6+1 | Cached · Upstream SHA-256 matched | Download | 93f3b1d8…3fe28b |
| 0.2.6+2 | Cached · Upstream SHA-256 matched | Download | 4dfba8a3…00b9c3 |
| 0.2.6+3 | Cached · Upstream SHA-256 matched | Download | 58619214…01f933 |
| 0.2.7 | Cached · Upstream SHA-256 matched | Download | facec117…066d67 |
| 0.2.8 | Cached · Upstream SHA-256 matched | Download | 29b40c42…f9cf5f |
| 0.2.8+1 | Cached · Upstream SHA-256 matched | Download | 4255a09e…3582ea |
| 0.2.8+2 | Cached · Upstream SHA-256 matched | Download | 59f4a55e…5a94d4 |
| 0.2.9 | Cached · Upstream SHA-256 matched | Download | 6a0928cc…b88c3f |
| 0.3.0 | Cached · Upstream SHA-256 matched | Download | ca3bef9d…203db2 |
| 0.3.0+1 | Cached · Upstream SHA-256 matched | Download | 5cba40e0…5fc876 |
| 0.3.1 | Cached · Upstream SHA-256 matched | Download | 0606f3e1…d0e1a2 |
| 0.4.0 | Cached · Upstream SHA-256 matched | Download | 2b2e1c40…efff07 |
| 0.5.0 | Cached · Upstream SHA-256 matched | Download | 12856153…0a6715 |
| 0.5.1 | Cached · Upstream SHA-256 matched | Download | 0bad70fe…6d3d3b |
Dependencies
flutter {
"sdk": "flutter"
}