Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
minikin committed Jan 10, 2021
1 parent 9c96d3c commit 51738c1
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## [0.0.1] - TODO: Add release date.
## [0.0.1] - 10.01.2021.

* TODO: Describe initial release.
* Initial release.
65 changes: 64 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Source: [Human Interface Guidelines.
## Requirements

- Dart: 2.9.0+
- Flutter : 1.17.5+

## Install

Expand All @@ -68,6 +69,68 @@ dependencies:
## Example
See `example/example.dart`.


```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(
width: 200,
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')),
),
builder: (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:

```sh
Expand All @@ -76,7 +139,7 @@ cd example && flutter run

## TODO:

- [Add documentaion](https://github.com/minikin/popover/issues/5)
- [Add documentation](https://github.com/minikin/popover/issues/5)

## FAQ

Expand Down
1 change: 0 additions & 1 deletion example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Popover Example

```dart
import 'package:flutter/material.dart';
import 'package:popover/popover.dart';
Expand Down

0 comments on commit 51738c1

Please sign in to comment.