diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml index 47bd81f..aeac74f 100644 --- a/android/.idea/gradle.xml +++ b/android/.idea/gradle.xml @@ -1,16 +1,17 @@ + diff --git a/android/build.gradle b/android/build.gradle index 511c120..9f42ab2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,14 +9,13 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:8.9.1' } } rootProject.allprojects { repositories { google() - jcenter() maven { url "https://jitpack.io" } } } @@ -24,11 +23,12 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 28 + namespace 'com.appleeducate.fluttermidi' + compileSdk 35 defaultConfig { minSdkVersion 16 - targetSdkVersion 28 + targetSdkVersion 35 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { @@ -38,4 +38,4 @@ android { dependencies { implementation 'com.github.appleeducate:MidiDriver-Android-SF2:1.0' -} \ No newline at end of file +} diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 9a4163a..d6e308a 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/src/main/java/com/appleeducate/fluttermidi/FlutterMidiPlugin.java b/android/src/main/java/com/appleeducate/fluttermidi/FlutterMidiPlugin.java index 7fccb49..05a47e0 100644 --- a/android/src/main/java/com/appleeducate/fluttermidi/FlutterMidiPlugin.java +++ b/android/src/main/java/com/appleeducate/fluttermidi/FlutterMidiPlugin.java @@ -1,6 +1,9 @@ package com.appleeducate.fluttermidi; import android.content.Context; + +import androidx.annotation.NonNull; + import cn.sherlock.com.sun.media.sound.SF2Soundbank; import cn.sherlock.com.sun.media.sound.SoftSynthesizer; import io.flutter.embedding.engine.plugins.FlutterPlugin; @@ -10,109 +13,111 @@ import io.flutter.plugin.common.MethodChannel.Result; import io.flutter.plugin.common.PluginRegistry.Registrar; import io.flutter.plugin.common.BinaryMessenger; + import java.io.File; import java.io.IOException; + import jp.kshoji.javax.sound.midi.InvalidMidiDataException; import jp.kshoji.javax.sound.midi.MidiUnavailableException; import jp.kshoji.javax.sound.midi.Receiver; import jp.kshoji.javax.sound.midi.ShortMessage; -/** FlutterMidiPlugin */ +/** + * FlutterMidiPlugin + */ public class FlutterMidiPlugin implements MethodCallHandler, FlutterPlugin { - private SoftSynthesizer synth; - private Receiver recv; - private MethodChannel methodChannel; - private Context applicationContext; + private SoftSynthesizer synth; + private Receiver recv; + private MethodChannel methodChannel; + private Context applicationContext; - /** Plugin registration. */ - @SuppressWarnings("deprecation") - public static void registerWith(Registrar registrar) { - final FlutterMidiPlugin instance = new FlutterMidiPlugin(); - instance.onAttachedToEngine(registrar.context(), registrar.messenger()); - } + /** + * Plugin registration. + */ + @SuppressWarnings("deprecation") + public static void registerWith(Registrar registrar) { + final FlutterMidiPlugin instance = new FlutterMidiPlugin(); + instance.onAttachedToEngine(registrar.context(), registrar.messenger()); + } - @Override - public void onAttachedToEngine(FlutterPluginBinding binding) { - onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger()); - } + @Override + public void onAttachedToEngine(FlutterPluginBinding binding) { + onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger()); + } - /* - "Also, note that the plugin should still contain the static registerWith() method - to remain compatible with apps that don’t use the v2 Android embedding. - (See Upgrading pre 1.12 Android projects for details.) The easiest thing to - do (if possible) is move the logic from registerWith() into a private method that - both registerWith() and onAttachedToEngine() can call. Either registerWith() or - onAttachedToEngine() will be called, not both." + /* + "Also, note that the plugin should still contain the static registerWith() method + to remain compatible with apps that don’t use the v2 Android embedding. + (See Upgrading pre 1.12 Android projects for details.) The easiest thing to + do (if possible) is move the logic from registerWith() into a private method that + both registerWith() and onAttachedToEngine() can call. Either registerWith() or + onAttachedToEngine() will be called, not both." - - https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration - */ - private void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) { - methodChannel = new MethodChannel(messenger, "flutter_midi"); - methodChannel.setMethodCallHandler(new FlutterMidiPlugin()); - } + - https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration + */ + private void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) { + methodChannel = new MethodChannel(messenger, "flutter_midi"); + methodChannel.setMethodCallHandler(new FlutterMidiPlugin()); + } - @Override - public void onDetachedFromEngine(FlutterPluginBinding binding) { - applicationContext = null; - methodChannel.setMethodCallHandler(null); - methodChannel = null; - } + @Override + public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { + applicationContext = null; + methodChannel.setMethodCallHandler(null); + methodChannel = null; + } - @Override - public void onMethodCall(MethodCall call, Result result) { - if (call.method.equals("prepare_midi")) { - try { - String _path = call.argument("path"); - File _file = new File(_path); - SF2Soundbank sf = new SF2Soundbank(_file); - synth = new SoftSynthesizer(); - synth.open(); - synth.loadAllInstruments(sf); - synth.getChannels()[0].programChange(0); - synth.getChannels()[1].programChange(1); - recv = synth.getReceiver(); - } catch (IOException e) { - e.printStackTrace(); - } catch (MidiUnavailableException e) { - e.printStackTrace(); - } - } else if (call.method.equals("change_sound")) { - try { - String _path = call.argument("path"); - File _file = new File(_path); - SF2Soundbank sf = new SF2Soundbank(_file); - synth = new SoftSynthesizer(); - synth.open(); - synth.loadAllInstruments(sf); - synth.getChannels()[0].programChange(0); - synth.getChannels()[1].programChange(1); - recv = synth.getReceiver(); - } catch (IOException e) { - e.printStackTrace(); - } catch (MidiUnavailableException e) { - e.printStackTrace(); - } - } else if (call.method.equals("play_midi_note")) { - int _note = call.argument("note"); - int _velocity = call.argument("velocity"); - try { - ShortMessage msg = new ShortMessage(); - msg.setMessage(ShortMessage.NOTE_ON, 0, _note, _velocity); - recv.send(msg, -1); - } catch (InvalidMidiDataException e) { - e.printStackTrace(); - } - } else if (call.method.equals("stop_midi_note")) { - int _note = call.argument("note"); - int _velocity = call.argument("velocity"); - try { - ShortMessage msg = new ShortMessage(); - msg.setMessage(ShortMessage.NOTE_OFF, 0, _note, _velocity); - recv.send(msg, -1); - } catch (InvalidMidiDataException e) { - e.printStackTrace(); - } - } else { + @Override + public void onMethodCall(MethodCall call, @NonNull Result result) { + switch (call.method) { + case "prepare_midi": + case "change_sound": + try { + String _path = call.argument("path"); + File _file = new File(_path); + SF2Soundbank sf = new SF2Soundbank(_file); + synth = new SoftSynthesizer(); + synth.open(); + synth.loadAllInstruments(sf); + synth.getChannels()[0].programChange(0); + synth.getChannels()[1].programChange(1); + recv = synth.getReceiver(); + result.success(null); + } catch (IOException | MidiUnavailableException e) { + e.printStackTrace(); + result.error(e.getMessage(), null, null); + } + break; + case "play_midi_note": { + int _note = call.argument("note"); + int _velocity = call.argument("velocity"); + try { + ShortMessage msg = new ShortMessage(); + msg.setMessage(ShortMessage.NOTE_ON, 0, _note, _velocity); + recv.send(msg, -1); + result.success(null); + } catch (InvalidMidiDataException e) { + e.printStackTrace(); + result.error(e.getMessage(), null, null); + } + break; + } + case "stop_midi_note": { + int _note = call.argument("note"); + int _velocity = call.argument("velocity"); + try { + ShortMessage msg = new ShortMessage(); + msg.setMessage(ShortMessage.NOTE_OFF, 0, _note, _velocity); + recv.send(msg, -1); + result.success(null); + } catch (InvalidMidiDataException e) { + e.printStackTrace(); + result.error(e.getMessage(), null, null); + } + break; + } + default: + break; + } } - } } diff --git a/example/android/.gitignore b/example/android/.gitignore index bc2100d..f05ea7f 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -5,3 +5,4 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 0f6a5e5..672b571 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,36 +1,10 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' +plugins { + id "com.android.application" + id "dev.flutter.flutter-gradle-plugin" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } + compileSdkVersion 35 lintOptions { disable 'InvalidPackage' @@ -39,10 +13,10 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.example" - minSdkVersion 16 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdkVersion 21 + targetSdkVersion 35 + versionCode flutter.versionCode + versionName flutter.versionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -60,8 +34,7 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test:runner:1.6.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/example/android/build.gradle b/example/android/build.gradle index 3100ad2..bc157bd 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,20 +1,7 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() - jcenter() + mavenCentral() } } @@ -26,6 +13,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 38c8d45..94adc3a 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,4 +1,3 @@ org.gradle.jvmargs=-Xmx1536M -android.enableR8=true android.useAndroidX=true android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 296b146..d60c383 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Jun 23 08:50:38 CEST 2017 +#Wed Jan 31 00:12:58 IST 2024 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +zipStoreBase=GRADLE_USER_HOME diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 5a2f14f..8cbe490 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,15 +1,24 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.9.1" apply false } + +include ":app" \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 347d3f4..6551373 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,65 +5,58 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" source: hosted - version: "2.8.1" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.4.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.19.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.2" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.2" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "2.1.4" flutter: dependency: "direct main" description: flutter @@ -90,168 +83,215 @@ packages: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "3.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.16.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" path_provider: dependency: transitive description: name: path_provider - url: "https://pub.dartlang.org" + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" source: hosted - version: "2.0.5" - path_provider_linux: + version: "2.1.5" + path_provider_android: dependency: transitive description: - name: path_provider_linux - url: "https://pub.dartlang.org" + name: path_provider_android + sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12" + url: "https://pub.dev" source: hosted - version: "2.1.0" - path_provider_macos: + version: "2.2.16" + path_provider_foundation: dependency: transitive description: - name: path_provider_macos - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.3.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" source: hosted - version: "2.0.1" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.3" + version: "2.1.8" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" source: hosted - version: "0.4.2" + version: "0.7.4" tonic: dependency: transitive description: name: tonic - url: "https://pub.dartlang.org" + sha256: "4c5f3cc7d41cb256822aa5875cd89ccd94a2854912db3dddf4425a46d3d3dd15" + url: "https://pub.dev" source: hosted - version: "0.2.4" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.2.5" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.0" - win32: + version: "2.1.4" + vm_service: dependency: transitive description: - name: win32 - url: "https://pub.dartlang.org" + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" source: hosted - version: "2.2.9" + version: "14.3.1" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "1.1.0" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=2.5.0" + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/lib/src/cache.dart b/lib/src/cache.dart index 97723d1..da30230 100644 --- a/lib/src/cache.dart +++ b/lib/src/cache.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:io'; import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; import 'package:path_provider/path_provider.dart'; Future writeToFile(ByteData data, diff --git a/lib/src/platform_interface.dart b/lib/src/platform_interface.dart index 3fd6ab5..000d582 100644 --- a/lib/src/platform_interface.dart +++ b/lib/src/platform_interface.dart @@ -1,5 +1,4 @@ import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; import 'method_channel.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 82017f6..fcd7773 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,6 @@ name: flutter_midi description: A FLutter Plugin to Play midi on iOS and Android. version: 1.1.1 -author: Rody Davis homepage: https://github.com/rodydavis/flutter_midi environment: @@ -12,9 +11,9 @@ dependencies: sdk: flutter flutter_web_plugins: sdk: flutter - js: ^0.6.3 - path_provider: ^2.0.5 - plugin_platform_interface: ^2.0.1 + js: ^0.7.0 + path_provider: ^2.1.2 + plugin_platform_interface: ^2.1.8 tonic: ^0.2.4 flutter: