|
1 | | -<!-- |
2 | | -This README describes the package. If you publish this package to pub.dev, |
3 | | -this README's contents appear on the landing page for your package. |
4 | | -
|
5 | | -For information about how to write a good package README, see the guide for |
6 | | -[writing package pages](https://dart.dev/tools/pub/writing-package-pages). |
7 | | -
|
8 | | -For general information about developing packages, see the Dart guide for |
9 | | -[creating packages](https://dart.dev/guides/libraries/create-packages) |
10 | | -and the Flutter guide for |
11 | | -[developing packages and plugins](https://flutter.dev/to/develop-packages). |
12 | | ---> |
13 | | - |
14 | | -TODO: Put a short description of the package here that helps potential users |
15 | | -know whether this package might be useful for them. |
16 | | - |
17 | | -## Features |
18 | | - |
19 | | -TODO: List what your package can do. Maybe include images, gifs, or videos. |
20 | | - |
21 | | -## Getting started |
22 | | - |
23 | | -TODO: List prerequisites and provide or point to information on how to |
24 | | -start using the package. |
25 | | - |
26 | | -## Usage |
27 | | - |
28 | | -TODO: Include short and useful examples for package users. Add longer examples |
29 | | -to `/example` folder. |
30 | | - |
| 1 | +# phasetida_flutter |
| 2 | +[]() |
| 3 | +[phasetida-node-demo](https://github.com/phasetida/phasetida-node-demo)的Flutter包装,使用了[flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview)包装 |
| 4 | + |
| 5 | +## 安装 |
| 6 | +### 引用Github仓库 |
| 7 | +1. 在``pubspec.yaml``里添加依赖 |
| 8 | + ```yaml |
| 9 | + dependencies: |
| 10 | + # ... |
| 11 | + phasetida_flutter: |
| 12 | + git: https://github.com/phasetida/phasetida_flutter.git |
| 13 | + ``` |
| 14 | +2. 运行命令来更新项目 |
| 15 | + ```bash |
| 16 | + flutter pub get |
| 17 | + ``` |
| 18 | + |
| 19 | +## 使用 |
| 20 | +这个包添加了一个Widget,即``PhigrosChartPlayerShellWidget``和``PhigrosChartPlayerWidget``,前者为后者的包装,推荐使用前者。简单的使用方法大致如下: |
31 | 21 | ```dart |
32 | | -const like = 'sample'; |
| 22 | +PhigrosChartPlayerShellWidget( |
| 23 | + jsonData: /* add your chart json data here*/, |
| 24 | + port: 11451 /* the port of local server */, |
| 25 | + songName: /* for ui display */, |
| 26 | + author: /* for ui display */, |
| 27 | + chartComposer: /* for ui display */, |
| 28 | + quitCallback: () { /* the behavior of clicking back button in widget*/ |
| 29 | + Navigator.pop(context); |
| 30 | + }, |
| 31 | +) |
33 | 32 | ``` |
34 | | - |
35 | | -## Additional information |
36 | | - |
37 | | -TODO: Tell users more about the package: where to find more information, how to |
38 | | -contribute to the package, how to file issues, what response they can expect |
39 | | -from the package authors, and more. |
| 33 | +如果想要更加精细的控制,请包装``PhigrosChartPlayerWidget``,并参考[phasetida-node-demo](https://github.com/phasetida/phasetida-node-demo)在``window``里定义的函数来添加自定义Javascript交互 |
| 34 | + |
| 35 | +## 贡献者 |
| 36 | +感谢以下贡献者对这个项目做出的贡献 |
| 37 | +||| |
| 38 | +|:-:|:-:| |
| 39 | +|[](https://github.com/qianmo2233)| |
| 40 | +|[@qianmo2233](https://github.com/qianmo2233)| |
| 41 | +|拯救了这个包原先丑陋的UI和糟糕的用户体验|| |
0 commit comments