diff --git a/README.md b/README.md index d0d7cca..cf50974 100644 --- a/README.md +++ b/README.md @@ -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. - \ No newline at end of file + + +## Importing directly from Github + +Edit your pubspec.yaml and add piggy to your dependencies: + +```yaml +dependencies: + piggy: + git: git@github.com: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'; +``` \ No newline at end of file