Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README.md with instructions on importing directly from Github #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,32 @@ A Treeview component for Flutter, featuring expand/collapse all, search, hilite,
## Getting Started

How to use?
1. Import TreeView.dart.
1. Import TreeView.dart. (see details below to import directly from github)
2. Derive TreeNodeData to publish your own data.
3. See AccountList.dart for the example detail.


<img src="https://raw.githubusercontent.com/AndrewTran2018/flutter-piggy-treeview/screenshot/Screenshot_1517923304.png" width="540" height="960">
<img src="https://raw.githubusercontent.com/AndrewTran2018/flutter-piggy-treeview/screenshot/Screenshot_1517923304.png" width="540" height="960">

## Importing directly from Github

Edit your pubspec.yaml and add piggy to your dependencies:

```yaml
dependencies:
piggy:
git: [email protected]:AndrewTran2018/flutter-piggy-treeview.git
flutter:
sdk: flutter
```

run `flutter package get` to install the new dependency

You will now have the following imports available to you:

```dart
import 'package:piggy/src/Global.dart';
import 'package:piggy/src/BasicPage.dart';
import 'package:piggy/src/SearchBar.dart';
import 'Package:piggy/src/TreeView.dart';
```