phasetida-node-demo的Flutter包装,使用了flutter_inappwebview包装
- 在
pubspec.yaml里添加依赖dependencies: # ... phasetida_flutter: git: https://github.com/phasetida/phasetida_flutter.git
- 运行命令来更新项目
flutter pub get
这个包添加了一个Widget,即PhigrosChartPlayerShellWidget和PhigrosChartPlayerWidget,前者为后者的包装,推荐使用前者。简单的使用方法大致如下:
PhigrosChartPlayerShellWidget(
jsonData: /* add your chart json data here*/,
port: 11451 /* the port of local server */,
songName: /* for ui display */,
author: /* for ui display */,
chartComposer: /* for ui display */,
quitCallback: () { /* the behavior of clicking back button in widget*/
Navigator.pop(context);
},
)如果想要更加精细的控制,请包装PhigrosChartPlayerWidget,并参考phasetida-node-demo在window里定义的函数来添加自定义Javascript交互
感谢以下贡献者对这个项目做出的贡献
![]() |
|
| @qianmo2233 | |
| 拯救了这个包原先丑陋的UI和糟糕的用户体验 |
