Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand All @@ -28,4 +30,4 @@ migrate_working_dir/
.dart_tool/
.flutter-plugins-dependencies
/build/
/coverage/
/coverage/
36 changes: 34 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,39 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "f6ff1529fd6d8af5f706051d9251ac9231c83407"
revision: "67323de285b00232883f53b84095eb72be97d35c"
channel: "stable"

project_type: package
project_type: plugin_ffi

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 67323de285b00232883f53b84095eb72be97d35c
base_revision: 67323de285b00232883f53b84095eb72be97d35c
- platform: android
create_revision: 67323de285b00232883f53b84095eb72be97d35c
base_revision: 67323de285b00232883f53b84095eb72be97d35c
- platform: ios
create_revision: 67323de285b00232883f53b84095eb72be97d35c
base_revision: 67323de285b00232883f53b84095eb72be97d35c
- platform: linux
create_revision: 67323de285b00232883f53b84095eb72be97d35c
base_revision: 67323de285b00232883f53b84095eb72be97d35c
- platform: macos
create_revision: 67323de285b00232883f53b84095eb72be97d35c
base_revision: 67323de285b00232883f53b84095eb72be97d35c
- platform: windows
create_revision: 67323de285b00232883f53b84095eb72be97d35c
base_revision: 67323de285b00232883f53b84095eb72be97d35c

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Add your license here.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# phasetida_flutter
[![Version](https://img.shields.io/badge/version-0.1.7-red.svg)]()
[phasetida-node-demo](https://github.com/phasetida/phasetida-node-demo)的Flutter包装,使用了[flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview)包装
[![Version](https://img.shields.io/badge/version-0.2.0-red.svg)]()
[phasetida-core](https://github.com/phasetida/phasetida-core)的Flutter包装

## 安装
### 引用Github仓库
Expand All @@ -10,18 +10,18 @@
# ...
phasetida_flutter:
git: https://github.com/phasetida/phasetida_flutter.git
ref: "0.2.0"
```
2. 运行命令来更新项目
```bash
flutter pub get
```

## 使用
这个包添加了一个Widget,即``PhigrosChartPlayerShellWidget``和``PhigrosChartPlayerWidget``,前者为后者的包装,推荐使用前者。简单的使用方法大致如下:
这个包添加了一个Widget,即``PhigrosSimulatorRenderWidget``和``PhigrosChartPlayerShellWidget``,前者为后者的包装,推荐使用前者。简单的使用方法大致如下:
```dart
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 */,
Expand All @@ -30,7 +30,7 @@ PhigrosChartPlayerShellWidget(
},
)
```
如果想要更加精细的控制,请包装``PhigrosChartPlayerWidget``,并参考[phasetida-node-demo](https://github.com/phasetida/phasetida-node-demo)在``window``里定义的函数来添加自定义Javascript交互
如果想要更加精细的控制,请包装``PhigrosSimulatorRenderWidget``

## 贡献者
感谢以下贡献者对这个项目做出的贡献
Expand Down
9 changes: 9 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.cxx
56 changes: 56 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// The Android Gradle Plugin builds the native code with the Android NDK.

group 'com.flutter_rust_bridge.phasetida_flutter'
version '1.0'

buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
// The Android Gradle Plugin knows how to build native code with the NDK.
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}

apply plugin: 'com.android.library'

android {
if (project.android.hasProperty("namespace")) {
namespace 'com.flutter_rust_bridge.phasetida_flutter'
}

// Bumping the plugin compileSdkVersion requires all clients of this plugin
// to bump the version in their app.
compileSdkVersion 33

// Use the NDK version
// declared in /android/app/build.gradle file of the Flutter project.
// Replace it with a version number if this plugin requires a specfic NDK version.
// (e.g. ndkVersion "23.1.7779620")
ndkVersion android.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion 19
}
}

apply from: "../cargokit/gradle/plugin.gradle"
cargokit {
manifestDir = "../rust"
libname = "phasetida_flutter"
}
1 change: 1 addition & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'phasetida_flutter'
3 changes: 3 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.flutter_rust_bridge.phasetida_flutter">
</manifest>
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 0 additions & 1 deletion assets/phasetida-node-demo/assets/index-R4_5dsXB.js

This file was deleted.

Binary file not shown.
Loading