Repository: rodydavis/flutter_piano Branch: master Commit: 4c2c83711554 Files: 125 Total size: 14.3 MB Directory structure: gitextract_v3wniokj/ ├── .flutter-plugins-dependencies ├── .gitattributes ├── .github/ │ └── workflows/ │ └── deploy.yml ├── .gitignore ├── .gitpod.yml ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android/ │ ├── .gitignore │ ├── app/ │ │ ├── build.gradle.kts │ │ ├── proguard-rules.pro │ │ └── src/ │ │ ├── debug/ │ │ │ └── AndroidManifest.xml │ │ ├── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin/ │ │ │ │ └── com/ │ │ │ │ └── appleeducate/ │ │ │ │ └── flutter_piano/ │ │ │ │ └── MainActivity.kt │ │ │ └── res/ │ │ │ ├── drawable/ │ │ │ │ └── launch_background.xml │ │ │ ├── drawable-v21/ │ │ │ │ └── launch_background.xml │ │ │ ├── values/ │ │ │ │ └── styles.xml │ │ │ ├── values-night/ │ │ │ │ └── styles.xml │ │ │ └── xml/ │ │ │ └── locales_config.xml │ │ └── profile/ │ │ └── AndroidManifest.xml │ ├── build.gradle.kts │ ├── gradle/ │ │ └── wrapper/ │ │ └── gradle-wrapper.properties │ ├── gradle.properties │ └── settings.gradle.kts ├── assets/ │ └── sounds/ │ └── Piano.sf2 ├── bin/ │ └── server.dart ├── content/ │ ├── changelog.md │ └── privacy-policy.md ├── docker-compose.yaml ├── icons/ │ ├── ios/ │ │ ├── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ └── README.md │ └── watchkit/ │ └── AppIcon.appiconset/ │ └── Contents.json ├── ios/ │ ├── .derived-data-log-0CA5RPJ1 │ ├── .gitignore │ ├── Flutter/ │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Runner/ │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── LaunchImage.imageset/ │ │ │ ├── Contents.json │ │ │ └── README.md │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h │ ├── Runner.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata/ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ └── RunnerTests/ │ └── RunnerTests.swift ├── l10n.yaml ├── lib/ │ ├── l10n/ │ │ ├── app_de.arb │ │ ├── app_en.arb │ │ ├── app_es.arb │ │ ├── app_fr.arb │ │ ├── app_ja.arb │ │ ├── app_ko.arb │ │ ├── app_localizations.dart │ │ ├── app_localizations_de.dart │ │ ├── app_localizations_en.dart │ │ ├── app_localizations_es.dart │ │ ├── app_localizations_fr.dart │ │ ├── app_localizations_ja.dart │ │ ├── app_localizations_ko.dart │ │ ├── app_localizations_ru.dart │ │ ├── app_localizations_zh.dart │ │ ├── app_ru.arb │ │ └── app_zh.arb │ ├── main.dart │ ├── src/ │ │ ├── models/ │ │ │ └── settings_models.dart │ │ ├── services/ │ │ │ ├── audio/ │ │ │ │ ├── pcm_audio_player.dart │ │ │ │ ├── pcm_audio_player_native.dart │ │ │ │ ├── pcm_audio_player_stub.dart │ │ │ │ └── pcm_audio_player_web.dart │ │ │ ├── chord_engine.dart │ │ │ ├── injection.config.dart │ │ │ ├── injection.dart │ │ │ ├── player.dart │ │ │ └── settings.dart │ │ └── version.dart │ └── ui/ │ ├── hooks/ │ │ ├── use_chord_recognition.dart │ │ ├── use_octave.dart │ │ ├── use_piano_keyboard.dart │ │ ├── use_player.dart │ │ ├── use_sustain.dart │ │ └── use_velocity.dart │ ├── router.dart │ ├── screens/ │ │ ├── app.dart │ │ ├── home.dart │ │ └── settings.dart │ └── widgets/ │ ├── color_picker.dart │ ├── color_role.dart │ ├── locale.dart │ ├── piano_key.dart │ ├── piano_section.dart │ ├── piano_slider.dart │ └── piano_view.dart ├── main.yml ├── pubspec.yaml ├── templates/ │ ├── base.mustache │ ├── markdown.mustache │ └── marketing.mustache ├── test/ │ ├── home_test.dart │ ├── src/ │ │ └── services/ │ │ ├── chord_engine_test.dart │ │ ├── player_test.dart │ │ └── settings_test.dart │ └── ui/ │ └── hooks/ │ ├── use_chord_recognition_test.dart │ ├── use_octave_test.dart │ ├── use_piano_keyboard_test.dart │ ├── use_player_test.dart │ ├── use_sustain_test.dart │ └── use_velocity_test.dart └── web/ ├── .nojekyll ├── CNAME ├── browserconfig.xml ├── index.html └── manifest.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .flutter-plugins-dependencies ================================================ {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_pcm_sound","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/flutter_pcm_sound-3.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/url_launcher_ios-6.4.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_pcm_sound","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/flutter_pcm_sound-3.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_android-2.2.23/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.23/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.29/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_pcm_sound","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/flutter_pcm_sound-3.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.2/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_pcm_sound","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2026-04-06 21:38:13.421098","version":"3.41.5","swift_package_manager_enabled":{"ios":false,"macos":false}} ================================================ FILE: .gitattributes ================================================ # Auto detect text files and perform LF normalization * text=auto ================================================ FILE: .github/workflows/deploy.yml ================================================ name: Build and Deploy on: push: branches: ["master"] env: REGISTRY: registry.rodydavis.dev IMAGE_NAME: pocket-piano-web jobs: build-and-deploy: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup Flutter uses: subosito/flutter-action@v2 with: version: '3.41.5' channel: 'stable' architecture: x64 - name: Install dependencies run: flutter pub get - name: Build Runner run: dart run build_runner build --delete-conflicting-outputs - name: Build Web run: flutter build web --base-href /web/ --wasm - name: Build CLI Server run: dart build cli -o build/server - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Generate Dynamic Dockerfile run: | cat < Dockerfile # syntax=docker/dockerfile:1.4 FROM debian:bookworm-slim RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ ca-certificates \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY build/server/bundle /app/server COPY build/web /app/build/web COPY content /app/content COPY templates /app/templates EXPOSE 80 ENV PORT=80 CMD ["/app/server/bin/server"] EOF - name: Login to registry uses: docker/login-action@v4 with: registry: ${{ env.REGISTRY }} username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Build and push image uses: docker/build-push-action@v5 with: context: . file: Dockerfile push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest cache-from: type=gha cache-to: type=gha,mode=max - name: Deploy to Coolify run: | curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}' ================================================ FILE: .gitignore ================================================ # Miscellaneous *.class *.log *.pyc *.swp .DS_Store .atom/ .buildlog/ .history .svn/ # IntelliJ related *.iml *.ipr *.iws .idea/ # Visual Studio Code related .vscode/ # Flutter/Dart/Pub related **/doc/api/ .dart_tool/ .flutter-plugins .packages .pub-cache/ .pub/ /build/ # Android related **/android/**/gradle-wrapper.jar **/android/.gradle **/android/captures/ **/android/gradlew **/android/gradlew.bat **/android/local.properties **/android/**/GeneratedPluginRegistrant.java # iOS/XCode related **/ios/**/*.mode1v3 **/ios/**/*.mode2v3 **/ios/**/*.moved-aside **/ios/**/*.pbxuser **/ios/**/*.perspectivev3 **/ios/**/*sync/ **/ios/**/.sconsign.dblite **/ios/**/.tags* **/ios/**/.vagrant/ **/ios/**/DerivedData/ **/ios/**/Icon? **/ios/**/Pods/ **/ios/**/.symlinks/ **/ios/**/profile **/ios/**/xcuserdata **/ios/.generated/ **/ios/Flutter/App.framework **/ios/Flutter/Flutter.framework **/ios/Flutter/Generated.xcconfig **/ios/Flutter/app.flx **/ios/Flutter/app.zip **/ios/Flutter/flutter_assets/ **/ios/ServiceDefinitions.json **/ios/Runner/GeneratedPluginRegistrant.* # Exceptions to above rules. !**/ios/**/default.mode1v3 !**/ios/**/default.mode2v3 !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages *.ipa android/app/google_play.json android/app/google-services.json report.xml *.p8 *.dSYM.zip *.app *.pkg *.zip ================================================ FILE: .gitpod.yml ================================================ image: file: .gitpod.dockerfile github: prebuilds: master: true branches: false pullRequests: true pullRequestsFromForks: false addCheck: false addComment: true addBadge: false addLabel: false tasks: - command: | mkdir -p /home/gitpod/.android touch /home/gitpod/.android/repositories.cfg export PATH=/usr/lib/dart/bin:$FLUTTER_HOME/bin:$ANDROID_HOME/bin:$PATH /home/gitpod/android-sdk/tools/bin/sdkmanager "platform-tools" "platforms;android-28" "build-tools;28.0.3" vscode: extensions: - Dart-Code.flutter@3.5.1:0FyuzXye7dV19PNst3+Llg== - Dart-Code.dart-code@3.5.1:W6zqgIED1gxtkBH/pbfGXA== - Lihaha.flutter-img-sync@0.1.4:N3SNjcbELCkl1SL2Ioy1XQ== - gmlewis-vscode.flutter-stylizer@0.0.14:30jQHcd6GmlCjjhbSbCbyg== - esskar.vscode-flutter-i18n-json@0.26.0:VK1HoVtBPYpJ+zzQl7/ulQ== - FelixAngelov.bloc@1.0.0:B2lAmHytUcIq+xSL3quiOA== - ms-azuretools.vscode-docker@0.8.1:h+G8u0NnsSvzGg5SM6TOWA== ================================================ FILE: .metadata ================================================ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # # This file should be version controlled and should not be manually edited. version: revision: "2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa" channel: "stable" project_type: app # Tracks metadata for the flutter migrate command migration: platforms: - platform: root create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa - platform: android create_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa base_revision: 2c9eb20739dfec95e2c74bd3dfa4601b0a8a36aa # 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' ================================================ FILE: CHANGELOG.md ================================================ ## 1.7.0 - Adding octave control to UI - Adding locale for English, German, Spanish, French, Japanese, Korean, Chinese, and Russian - Fixing crash on out of memory for some devices - Adding sustain ## 1.6.0 - Update to Material 3 - Updating code project to use a different midi synth ================================================ FILE: LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: README.md ================================================ [![Codemagic build status](https://api.codemagic.io/apps/5cd0f574c95918000ce25e99/5cd0f574c95918000ce25e98/status_badge.svg)](https://codemagic.io/apps/5cd0f574c95918000ce25e99/5cd0f574c95918000ce25e98/latest_build) # flutter_piano A Crossplatform Midi Piano built with Flutter.dev * This application runs on both iOS and Android. * This runs a custom crossplatform midi synth I built for a Flutter plugin `flutter_midi` that uses .SF2 sound font files. The Pocket Piano by Rody Davis [App Store](https://itunes.apple.com/us/app/the-pocket-piano/id1453992672?mt=8) | [Google Play](https://play.google.com/store/apps/details?id=com.appleeducate.flutter_piano) ``` assets: - assets/sounds/Piano.SF2 ``` * There are Semantics included for the visually impaired. All keys show up as buttons and have the pitch name of the midi note not just the number. ## Getting Started This application only runs in landscape mode, orientation is set in the AndroidManifest.xml and in the Runner.xcworspace settings. 1. Make sure to turn your volume up and unmute the phone (the application will try to unmute the device but it can be overriden). 2. Tap on any note to play 3. Scroll in either direction to change octaves 4. Polyphony is supported with multiple fingers ## Configuration * Optionally the key width can be changed in the settings for adjusting key densitity. * The key labels can also be turned off if you want a more minimal look. * You can change the Piano.sf2 file to any sound font file for playing different instruments. ## Code ``` dart import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_midi/flutter_midi.dart'; import 'package:tonic/tonic.dart'; void main() => runApp(MyApp()); class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State { @override initState() { FlutterMidi.unmute(); rootBundle.load("assets/sounds/Piano.SF2").then((sf2) { FlutterMidi.prepare(sf2: sf2, name: "Piano.SF2"); }); super.initState(); } double get keyWidth => 80 + (80 * _widthRatio); double _widthRatio = 0.0; bool _showLabels = true; @override Widget build(BuildContext context) { return MaterialApp( title: 'The Pocket Piano', theme: ThemeData.dark(), home: Scaffold( drawer: Drawer( child: SafeArea( child: ListView(children: [ Container(height: 20.0), ListTile(title: Text("Change Width")), Slider( activeColor: Colors.redAccent, inactiveColor: Colors.white, min: 0.0, max: 1.0, value: _widthRatio, onChanged: (double value) => setState(() => _widthRatio = value)), Divider(), ListTile( title: Text("Show Labels"), trailing: Switch( value: _showLabels, onChanged: (bool value) => setState(() => _showLabels = value))), Divider(), ]))), appBar: AppBar(title: Text("The Pocket Piano")), body: ListView.builder( itemCount: 7, controller: ScrollController(initialScrollOffset: 1500.0), scrollDirection: Axis.horizontal, itemBuilder: (BuildContext context, int index) { final int i = index * 12; return SafeArea( child: Stack(children: [ Row(mainAxisSize: MainAxisSize.min, children: [ _buildKey(24 + i, false), _buildKey(26 + i, false), _buildKey(28 + i, false), _buildKey(29 + i, false), _buildKey(31 + i, false), _buildKey(33 + i, false), _buildKey(35 + i, false), ]), Positioned( left: 0.0, right: 0.0, bottom: 100, top: 0.0, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.min, children: [ Container(width: keyWidth * .5), _buildKey(25 + i, true), _buildKey(27 + i, true), Container(width: keyWidth), _buildKey(30 + i, true), _buildKey(32 + i, true), _buildKey(34 + i, true), Container(width: keyWidth * .5), ])), ]), ); }, )), ); } Widget _buildKey(int midi, bool accidental) { final pitchName = Pitch.fromMidiNumber(midi).toString(); final pianoKey = Stack( children: [ Semantics( button: true, hint: pitchName, child: Material( borderRadius: borderRadius, color: accidental ? Colors.black : Colors.white, child: InkWell( borderRadius: borderRadius, highlightColor: Colors.grey, onTap: () {}, onTapDown: (_) => FlutterMidi.playMidiNote(midi: midi), ))), Positioned( left: 0.0, right: 0.0, bottom: 20.0, child: _showLabels ? Text(pitchName, textAlign: TextAlign.center, style: TextStyle( color: !accidental ? Colors.black : Colors.white)) : Container()), ], ); if (accidental) { return Container( width: keyWidth, margin: EdgeInsets.symmetric(horizontal: 2.0), padding: EdgeInsets.symmetric(horizontal: keyWidth * .1), child: Material( elevation: 6.0, borderRadius: borderRadius, shadowColor: Color(0x802196F3), child: pianoKey)); } return Container( width: keyWidth, child: pianoKey, margin: EdgeInsets.symmetric(horizontal: 2.0)); } } const BorderRadiusGeometry borderRadius = BorderRadius.only( bottomLeft: Radius.circular(10.0), bottomRight: Radius.circular(10.0)); ``` ### Total Dart Code Size: 5039 bytes ## Special Thanks - @DFreds - @jesusrp98 ================================================ FILE: analysis_options.yaml ================================================ # This file configures the analyzer, which statically analyzes Dart code to # check for errors, warnings, and lints. # # The issues identified by the analyzer are surfaced in the UI of Dart-enabled # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be # invoked from the command line by running `flutter analyze`. # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` # included above or to enable additional rules. A list of all available lints # and their documentation is published at # https://dart-lang.github.io/linter/lints/index.html. # # Instead of disabling a lint rule for the entire project in the # section below, it can also be suppressed for a single line of code # or a specific dart file by using the `// ignore: name_of_lint` and # `// ignore_for_file: name_of_lint` syntax on the line or in the file # producing the lint. rules: # avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options ================================================ FILE: android/.gitignore ================================================ gradle-wrapper.jar /.gradle /captures/ /gradlew /gradlew.bat /local.properties GeneratedPluginRegistrant.java .cxx/ # Remember to never publicly share your keystore. # See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks ================================================ FILE: android/app/build.gradle.kts ================================================ import java.util.Properties plugins { id("com.android.application") id("kotlin-android") id("dev.flutter.flutter-gradle-plugin") } val localProperties = Properties() val localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { localPropertiesFile.inputStream().use { localProperties.load(it) } } val flutterVersionCode = localProperties.getProperty("flutter.versionCode") ?: "1" val flutterVersionName = localProperties.getProperty("flutter.versionName") ?: "1.0" val keystoreProperties = Properties() val keystorePropertiesFile = rootProject.file("key.properties") if (keystorePropertiesFile.exists()) { keystorePropertiesFile.inputStream().use { keystoreProperties.load(it) } } android { namespace = "com.appleeducate.flutter_piano" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } signingConfigs { if (keystoreProperties.containsKey("storeFile")) { create("release") { keyAlias = keystoreProperties["keyAlias"] as String keyPassword = keystoreProperties["keyPassword"] as String storeFile = file(keystoreProperties["storeFile"] as String) storePassword = keystoreProperties["storePassword"] as String } } } defaultConfig { applicationId = "com.appleeducate.flutter_piano" minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutterVersionCode.toInt() versionName = flutterVersionName } buildTypes { release { proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") if (keystoreProperties.containsKey("storeFile")) { signingConfig = signingConfigs.getByName("release") } else { signingConfig = signingConfigs.getByName("debug") } } } } flutter { source = "../.." } ================================================ FILE: android/app/proguard-rules.pro ================================================ # MediaPipe ProGuard Rules -keep class com.google.mediapipe.proto.** { *; } -keep class com.google.mediapipe.framework.** { *; } -dontwarn com.google.mediapipe.** ================================================ FILE: android/app/src/debug/AndroidManifest.xml ================================================ ================================================ FILE: android/app/src/main/AndroidManifest.xml ================================================ ================================================ FILE: android/app/src/main/kotlin/com/appleeducate/flutter_piano/MainActivity.kt ================================================ package com.appleeducate.flutter_piano import io.flutter.embedding.android.FlutterActivity class MainActivity : FlutterActivity() ================================================ FILE: android/app/src/main/res/drawable/launch_background.xml ================================================ ================================================ FILE: android/app/src/main/res/drawable-v21/launch_background.xml ================================================ ================================================ FILE: android/app/src/main/res/values/styles.xml ================================================ ================================================ FILE: android/app/src/main/res/values-night/styles.xml ================================================ ================================================ FILE: android/app/src/main/res/xml/locales_config.xml ================================================ ================================================ FILE: android/app/src/profile/AndroidManifest.xml ================================================ ================================================ FILE: android/build.gradle.kts ================================================ allprojects { repositories { google() mavenCentral() } } val newBuildDir: Directory = rootProject.layout.buildDirectory .dir("../../build") .get() rootProject.layout.buildDirectory.value(newBuildDir) subprojects { val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) project.layout.buildDirectory.value(newSubprojectBuildDir) } subprojects { project.evaluationDependsOn(":app") } tasks.register("clean") { delete(rootProject.layout.buildDirectory) } ================================================ FILE: android/gradle/wrapper/gradle-wrapper.properties ================================================ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip ================================================ FILE: android/gradle.properties ================================================ org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true ================================================ FILE: android/settings.gradle.kts ================================================ pluginManagement { val flutterSdkPath = run { val properties = java.util.Properties() file("local.properties").inputStream().use { properties.load(it) } val flutterSdkPath = properties.getProperty("flutter.sdk") require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } flutterSdkPath } includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() mavenCentral() gradlePluginPortal() } } plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "8.11.1" apply false id("org.jetbrains.kotlin.android") version "2.2.20" apply false } include(":app") ================================================ FILE: assets/sounds/Piano.sf2 ================================================ [File too large to display: 14.0 MB] ================================================ FILE: bin/server.dart ================================================ import 'dart:io'; import 'package:shelf/shelf.dart'; import 'package:shelf/shelf_io.dart' as io; import 'package:shelf_router/shelf_router.dart'; import 'package:shelf_static/shelf_static.dart'; import 'package:markdown/markdown.dart'; import 'package:mustache_template/mustache.dart'; import 'package:recase/recase.dart'; void main(List args) async { final webBuildPath = 'build/web'; // Handler for regular static files in build/web final webBuildHandler = createStaticHandler( webBuildPath, defaultDocument: 'index.html', ); final router = Router(); router.get('/health', (Request request) { return Response.ok('OK'); }); router.get('/', (Request request) async { final pageHtml = await _getMarketingHtml(); return Response.ok( pageHtml, headers: {'content-type': 'text/html'}, ); }); router.get('/web', (Request request) { return Response.movedPermanently('/web/'); }); router.mount('/web/', (Request request) async { Response response = await webBuildHandler(request); // Fallback for SPA Routing if file not found and doesn't look like static file if (response.statusCode == 404 && !request.url.path.contains('.')) { final indexHtml = File('$webBuildPath/index.html'); if (await indexHtml.exists()) { return Response.ok( indexHtml.openRead(), headers: {'content-type': 'text/html'}, ); } } return response; }); // Markdown content routes router.get('/', (Request request, String name) async { final file = File('content/$name.md'); if (!await file.exists()) { return Response.notFound('Page not found'); } final markdownContent = await file.readAsString(); final htmlContent = markdownToHtml( markdownContent, extensionSet: ExtensionSet.gitHubWeb, ); // Create a title from the filename (e.g. "privacy" -> "Privacy") final title = name.titleCase; final pageHtml = await _getMarkdownHtml(title, htmlContent); return Response.ok(pageHtml, headers: {'content-type': 'text/html'}); }); // Serve the Flutter web app router.all('/', (Request request) async { final response = await webBuildHandler(request); // Fallback for SPA routing: if the file isn't found and doesn't look like a static asset, // serve index.html so the client-side router can take over. if (response.statusCode == 404 && !request.url.path.contains('.')) { final indexHtml = File('$webBuildPath/index.html'); if (await indexHtml.exists()) { return Response.ok( indexHtml.openRead(), headers: {'Content-Type': 'text/html'}, ); } } return response; }); // Setup the pipeline with logging and CORS headers final handler = const Pipeline() .addMiddleware(logRequests()) .addMiddleware(_corsHeaders()) .addHandler(router.call); // Use PORT from environment or default to 8080 final port = int.tryParse(Platform.environment['PORT'] ?? '8080') ?? 8080; final ip = InternetAddress.anyIPv4; final server = await io.serve(handler, ip, port); print('Server listening on port ${server.port}'); } Middleware _corsHeaders() { return (Handler innerHandler) { return (Request request) async { final response = await innerHandler(request); return response.change( headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', 'Access-Control-Allow-Headers': 'Origin, Content-Type, Accept, Authorization', 'Cross-Origin-Embedder-Policy': 'require-corp', 'Cross-Origin-Opener-Policy': 'same-origin', }, ); }; }; } Future _renderTemplate(String name, Map values) async { final file = File('templates/$name.mustache'); if (!await file.exists()) { return 'Template not found: $name'; } final source = await file.readAsString(); final template = Template(source, htmlEscapeValues: false); return template.renderString(values); } Future _getBaseLayout({ required String title, required String content, }) async { return await _renderTemplate('base', { 'title': title, 'content': content, 'year': DateTime.now().year, // 'linkDiscord': linkDiscord, // 'linkGithubIssues': linkGithubIssues, }); } Future _getMarketingHtml() async { final content = await _renderTemplate('marketing', { 'playStoreLink': 'https://play.google.com/store/apps/details?id=com.appleeducate.flutter_piano&hl=en_US', 'appStoreLink': 'https://apps.apple.com/us/app/the-pocket-piano/id1453992672', }); return await _getBaseLayout(title: 'Home', content: content); } Future _getMarkdownHtml(String title, String htmlBody) async { final content = await _renderTemplate('markdown', { 'markdownHtml': htmlBody, }); return await _getBaseLayout(title: title, content: content); } ================================================ FILE: content/changelog.md ================================================ ## 2.0.0 - Update UI to match related apps - Fix piano playback speed - Switch to midi engine and support dynamic sustain - Add chord detector for keys pressed in landscape - Spacebar now can sustain ================================================ FILE: content/privacy-policy.md ================================================ # Privacy Policy This Privacy Policy applies to the **Pocket Piano** application (the "App") developed by Rody Davis Productions. ## Data Collection We respect your privacy. **Pocket Piano does not collect, store, or transmit any personally-identifying information, usage statistics, or user data.** All functionality of the App operates entirely on your device. ## Data Deletion Because no data is collected or stored externally, there is no account to delete or remote data to manage. Any local settings or data generated by the App are stored solely on your device. **Deleting the App from your device will permanently delete all associated data.** ## Contact Information If you have any questions or concerns regarding this Privacy Policy or the App, please contact us at our physical address: **Rody Davis Productions** 7038 Calistoga Lane Dublin, California 94568 ================================================ FILE: docker-compose.yaml ================================================ services: pocket-piano-web: image: registry.rodydavis.dev/pocket-piano-web:latest restart: unless-stopped expose: - "80" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:80/health"] interval: 30s timeout: 10s retries: 3 ================================================ FILE: icons/ios/AppIcon.appiconset/Contents.json ================================================ { "images":[ { "idiom":"iphone", "size":"20x20", "scale":"2x", "filename":"Icon-App-20x20@2x.png" }, { "idiom":"iphone", "size":"20x20", "scale":"3x", "filename":"Icon-App-20x20@3x.png" }, { "idiom":"iphone", "size":"29x29", "scale":"1x", "filename":"Icon-App-29x29@1x.png" }, { "idiom":"iphone", "size":"29x29", "scale":"2x", "filename":"Icon-App-29x29@2x.png" }, { "idiom":"iphone", "size":"29x29", "scale":"3x", "filename":"Icon-App-29x29@3x.png" }, { "idiom":"iphone", "size":"40x40", "scale":"2x", "filename":"Icon-App-40x40@2x.png" }, { "idiom":"iphone", "size":"40x40", "scale":"3x", "filename":"Icon-App-40x40@3x.png" }, { "idiom":"iphone", "size":"60x60", "scale":"2x", "filename":"Icon-App-60x60@2x.png" }, { "idiom":"iphone", "size":"60x60", "scale":"3x", "filename":"Icon-App-60x60@3x.png" }, { "idiom":"iphone", "size":"76x76", "scale":"2x", "filename":"Icon-App-76x76@2x.png" }, { "idiom":"ipad", "size":"20x20", "scale":"1x", "filename":"Icon-App-20x20@1x.png" }, { "idiom":"ipad", "size":"20x20", "scale":"2x", "filename":"Icon-App-20x20@2x.png" }, { "idiom":"ipad", "size":"29x29", "scale":"1x", "filename":"Icon-App-29x29@1x.png" }, { "idiom":"ipad", "size":"29x29", "scale":"2x", "filename":"Icon-App-29x29@2x.png" }, { "idiom":"ipad", "size":"40x40", "scale":"1x", "filename":"Icon-App-40x40@1x.png" }, { "idiom":"ipad", "size":"40x40", "scale":"2x", "filename":"Icon-App-40x40@2x.png" }, { "idiom":"ipad", "size":"76x76", "scale":"1x", "filename":"Icon-App-76x76@1x.png" }, { "idiom":"ipad", "size":"76x76", "scale":"2x", "filename":"Icon-App-76x76@2x.png" }, { "idiom":"ipad", "size":"83.5x83.5", "scale":"2x", "filename":"Icon-App-83.5x83.5@2x.png" }, { "size" : "1024x1024", "idiom" : "ios-marketing", "scale" : "1x", "filename" : "ItunesArtwork@2x.png" } ], "info":{ "version":1, "author":"makeappicon" } } ================================================ FILE: icons/ios/README.md ================================================ ## iTunesArtwork & iTunesArtwork@2x (App Icon) file extension: PNG extension is prepended to these two files - While Apple suggested to omit the extension for these files, the '.png' extension is actually required for iTunesConnect submission. This is done for you so you don't have to. However, for Ad_hoc or Enterprise distirbution, the extension should be removed from the files before adding to XCode to avoid error. refs: https://developer.apple.com/library/ios/qa/qa1686/_index.html ## iTunesArtwork & iTunesArtwork@2x (App Icon) transparency handling: As images with alpha channels or transparencies cannot be set as an application's icon on iTunesConnect, all transparent pixels in your images will be converted into solid blacks. To achieve the best result, you're advised to adjust the transparency settings in your source files before converting them with makeAppIcon. refs: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/AppIcons.html ================================================ FILE: icons/watchkit/AppIcon.appiconset/Contents.json ================================================ { "images":[ { "size":"24x24", "idiom":"watch", "scale":"2x", "filename":"Icon-24@2x.png", "role":"notificationCenter", "subtype":"38mm" }, { "size":"27.5x27.5", "idiom":"watch", "scale":"2x", "filename":"Icon-27.5@2x.png", "role":"notificationCenter", "subtype":"42mm" }, { "size":"29x29", "idiom":"watch", "scale":"2x", "filename":"Icon-29@2x.png", "role":"companionSettings" }, { "size":"29x29", "idiom":"watch", "scale":"3x", "filename":"Icon-29@3x.png", "role":"companionSettings" }, { "size":"40x40", "idiom":"watch", "scale":"2x", "filename":"Icon-40@2x.png", "role":"appLauncher", "subtype":"38mm" }, { "size":"44x44", "idiom":"watch", "scale":"2x", "filename":"Icon-44@2x.png", "role":"longLook", "subtype":"42mm" }, { "size":"86x86", "idiom":"watch", "scale":"2x", "filename":"Icon-86@2x.png", "role":"quickLook", "subtype":"38mm" }, { "size":"98x98", "idiom":"watch", "scale":"2x", "filename":"Icon-98@2x.png", "role":"quickLook", "subtype":"42mm" } ], "info":{ "version":1, "author":"makeappicon" } } ================================================ FILE: ios/.derived-data-log-0CA5RPJ1 ================================================ { "entries" : [ { "accessDate" : "2026-04-06T21:38:24Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-06T21:55:55Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-06T22:20:56Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-06T22:51:01Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-06T23:06:04Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-06T23:21:07Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-06T23:36:10Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-06T23:51:13Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T00:06:16Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T00:21:19Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T00:36:19Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T00:51:19Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T01:06:22Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T01:21:25Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T01:36:28Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T01:51:31Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T02:06:34Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T02:21:37Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T02:36:40Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T02:51:43Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T03:06:46Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T03:21:49Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T03:36:52Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T04:01:41Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T04:16:43Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T04:31:46Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T04:46:47Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T05:01:49Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T05:16:52Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } }, { "accessDate" : "2026-04-07T05:31:55Z", "appBundlePath" : "\/Applications\/Xcode.app", "versionInfo" : { "roots" : [ ], "sdkVersions" : { "appletvos26.4" : "23L236", "appletvsimulator26.4" : "23L236", "iphoneos26.4" : "23E237", "iphonesimulator26.4" : "23E237", "macosx26.4" : "25E236", "watchos26.4" : "23T238", "watchsimulator26.4" : "23T238", "xros26.4" : "23O238", "xrsimulator26.4" : "23O238" }, "systemVersion" : "25D2128", "xcodeVersion" : "17E192" } } ] } ================================================ FILE: ios/.gitignore ================================================ **/dgph *.mode1v3 *.mode2v3 *.moved-aside *.pbxuser *.perspectivev3 **/*sync/ .sconsign.dblite .tags* **/.vagrant/ **/DerivedData/ Icon? **/Pods/ **/.symlinks/ profile xcuserdata **/.generated/ Flutter/App.framework Flutter/Flutter.framework Flutter/Flutter.podspec Flutter/Generated.xcconfig Flutter/ephemeral/ Flutter/app.flx Flutter/app.zip Flutter/flutter_assets/ Flutter/flutter_export_environment.sh ServiceDefinitions.json Runner/GeneratedPluginRegistrant.* # Exceptions to above rules. !default.mode1v3 !default.mode2v3 !default.pbxuser !default.perspectivev3 ================================================ FILE: ios/Flutter/AppFrameworkInfo.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable App CFBundleIdentifier io.flutter.flutter.app CFBundleInfoDictionaryVersion 6.0 CFBundleName App CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 ================================================ FILE: ios/Flutter/Debug.xcconfig ================================================ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" ================================================ FILE: ios/Flutter/Release.xcconfig ================================================ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" ================================================ FILE: ios/Podfile ================================================ # Uncomment this line to define a global platform for your project # platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, } def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) flutter_ios_podfile_setup target 'Runner' do use_frameworks! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths end end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end ================================================ FILE: ios/Runner/AppDelegate.swift ================================================ import Flutter import UIKit @main @objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { return super.application(application, didFinishLaunchingWithOptions: launchOptions) } func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) } } ================================================ FILE: ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "filename" : "ios-1024.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" } ], "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: ios/Runner/Assets.xcassets/Contents.json ================================================ { "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "LaunchImage.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "LaunchImage@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "LaunchImage@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md ================================================ # Launch Screen Assets You can customize the launch screen with your own desired assets by replacing the image files in this directory. You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. ================================================ FILE: ios/Runner/Base.lproj/LaunchScreen.storyboard ================================================ ================================================ FILE: ios/Runner/Base.lproj/Main.storyboard ================================================ ================================================ FILE: ios/Runner/Info.plist ================================================ CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName Pocket Piano CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleLocalizations en es de fr ja ko ru zh CFBundleName flutter_piano CFBundlePackageType APPL CFBundleShortVersionString $(FLUTTER_BUILD_NAME) CFBundleSignature ???? CFBundleVersion $(FLUTTER_BUILD_NUMBER) ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS UIApplicationSceneManifest UIApplicationSupportsMultipleScenes UISceneConfigurations UIWindowSceneSessionRoleApplication UISceneClassName UIWindowScene UISceneConfigurationName flutter UISceneDelegateClassName FlutterSceneDelegate UISceneStoryboardFile Main UIApplicationSupportsIndirectInputEvents UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIViewControllerBasedStatusBarAppearance ================================================ FILE: ios/Runner/Runner-Bridging-Header.h ================================================ #import "GeneratedPluginRegistrant.h" ================================================ FILE: ios/Runner.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 390B36CBAA70CEC9860F1D60 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F5B5A71A27DDF86B62F8E0 /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 974339D573604A5EC7295A2B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D69F3E57F489155508F7F9B /* Pods_RunnerTests.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 97C146E61CF9000F007C117D /* Project object */; proxyType = 1; remoteGlobalIDString = 97C146ED1CF9000F007C117D; remoteInfo = Runner; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 3D69F3E57F489155508F7F9B /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7E88766B42F5CFDD2F6DCE0C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9F42F5AFE4CE369201A8AA12 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; B12DA264AB150297579CE38B /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; C3BF1A2265F03F1536CD9069 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; DEF6B4C5DC636BA6C8352159 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; E3E07773389A916F8FA054B5 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; F3F5B5A71A27DDF86B62F8E0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 2FEC6887AC7229CF6D2DC4F7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 974339D573604A5EC7295A2B /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 390B36CBAA70CEC9860F1D60 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 31A8CA9790B2A0B66F844C9E /* Pods */ = { isa = PBXGroup; children = ( B12DA264AB150297579CE38B /* Pods-Runner.debug.xcconfig */, 7E88766B42F5CFDD2F6DCE0C /* Pods-Runner.release.xcconfig */, C3BF1A2265F03F1536CD9069 /* Pods-Runner.profile.xcconfig */, 9F42F5AFE4CE369201A8AA12 /* Pods-RunnerTests.debug.xcconfig */, DEF6B4C5DC636BA6C8352159 /* Pods-RunnerTests.release.xcconfig */, E3E07773389A916F8FA054B5 /* Pods-RunnerTests.profile.xcconfig */, ); path = Pods; sourceTree = ""; }; 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( 331C807B294A618700263BE5 /* RunnerTests.swift */, ); path = RunnerTests; sourceTree = ""; }; 925758BD80B9EDE57FD52282 /* Frameworks */ = { isa = PBXGroup; children = ( F3F5B5A71A27DDF86B62F8E0 /* Pods_Runner.framework */, 3D69F3E57F489155508F7F9B /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, ); name = Flutter; sourceTree = ""; }; 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, 31A8CA9790B2A0B66F844C9E /* Pods */, 925758BD80B9EDE57FD52282 /* Frameworks */, ); sourceTree = ""; }; 97C146EF1CF9000F007C117D /* Products */ = { isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, 331C8081294A63A400263BE5 /* RunnerTests.xctest */, ); name = Products; sourceTree = ""; }; 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( 97C146FA1CF9000F007C117D /* Main.storyboard */, 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, ); path = Runner; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 331C8080294A63A400263BE5 /* RunnerTests */ = { isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( 74B45AA802F3700E29A1C9A5 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, 2FEC6887AC7229CF6D2DC4F7 /* Frameworks */, ); buildRules = ( ); dependencies = ( 331C8086294A63A400263BE5 /* PBXTargetDependency */, ); name = RunnerTests; productName = RunnerTests; productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( 97C35AF40BE4E09DAE24931D /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, E0C6D0E8602EADABB03D4B43 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = Runner; productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { CreatedOnToolsVersion = 14.0; ProvisioningStyle = Automatic; TestTargetID = 97C146ED1CF9000F007C117D; }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; LastSwiftMigration = 1100; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 97C146E51CF9000F007C117D; productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, 331C8080294A63A400263BE5 /* RunnerTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 331C807F294A63A400263BE5 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; }; 74B45AA802F3700E29A1C9A5 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Run Script"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; 97C35AF40BE4E09DAE24931D /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; E0C6D0E8602EADABB03D4B43 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 331C807D294A63A400263BE5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 97C146ED1CF9000F007C117D /* Runner */; targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 97C146FB1CF9000F007C117D /* Base */, ); name = Main.storyboard; sourceTree = ""; }; 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( 97C147001CF9000F007C117D /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Profile; }; 249021D4217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 9FK3425VTA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Pocket Piano"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.appleeducate.pocketpiano; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9F42F5AFE4CE369201A8AA12 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.rodydavis.flutterPiano.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; }; name = Debug; }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = DEF6B4C5DC636BA6C8352159 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.rodydavis.flutterPiano.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; }; name = Release; }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; baseConfigurationReference = E3E07773389A916F8FA054B5 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.rodydavis.flutterPiano.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; }; name = Profile; }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; 97C147061CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 9FK3425VTA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Pocket Piano"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.appleeducate.pocketpiano; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; 97C147071CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = 9FK3425VTA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Pocket Piano"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = com.appleeducate.pocketpiano; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 331C8088294A63A400263BE5 /* Debug */, 331C8089294A63A400263BE5 /* Release */, 331C808A294A63A400263BE5 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( 97C147031CF9000F007C117D /* Debug */, 97C147041CF9000F007C117D /* Release */, 249021D3217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( 97C147061CF9000F007C117D /* Debug */, 97C147071CF9000F007C117D /* Release */, 249021D4217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } ================================================ FILE: ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ PreviewsEnabled ================================================ FILE: ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme ================================================ ================================================ FILE: ios/Runner.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ PreviewsEnabled ================================================ FILE: ios/RunnerTests/RunnerTests.swift ================================================ import Flutter import UIKit import XCTest class RunnerTests: XCTestCase { func testExample() { // If you add code to the Runner application, consider adding tests here. // See https://developer.apple.com/documentation/xctest for more information about using XCTest. } } ================================================ FILE: l10n.yaml ================================================ arb-dir: lib/l10n template-arb-file: app_en.arb output-localization-file: app_localizations.dart ================================================ FILE: lib/l10n/app_de.arb ================================================ { "@@locale": "de", "title": "Die Taschenpiano", "@title": {}, "sustain": "Anschlag", "@sustain": {}, "themeBrightness": "Themenhelligkeit", "@themeBrightness": {}, "themeBrightnessLight": "Hell", "@themeBrightnessLight": {}, "themeBrightnessSystem": "System", "@themeBrightnessSystem": {}, "themeBrightnessDark": "Dunkel", "@themeBrightnessDark": {}, "themeColor": "Themenfarbe", "@themeColor": {}, "keySettings": "Tasteneinstellungen", "@keySettings": {}, "settings": "Einstellungen", "@settings": {}, "keyWidth": "Tastenbreite", "@keyWidth": {}, "invertKeys": "Tasten invertieren", "@invertKeys": {}, "colorRole": "Farbrolle", "@colorRole": {}, "colorRolePrimary": "Primär", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "Primärer Container", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "Sekundär", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "Sekundärer Container", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "Tertiär", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "Tertiärer Container", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "Oberfläche", "@colorRoleSurface": {}, "colorRoleInverseSurface": "Inverse Oberfläche", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "Monochrom", "@colorRoleMonoChrome": {}, "keyLabels": "Tastenbeschriftungen", "@keyLabels": {}, "hapticFeedback": "Haptisches Feedback", "@hapticFeedback": {}, "keyLabelsNone": "Keine", "@keyLabelsNone": {}, "keyLabelsSharps": "Kreuzzeichen", "@keyLabelsSharps": {}, "keyLabelsFlats": "Bleistifte", "@keyLabelsFlats": {}, "keyLabelsBoth": "Beide", "@keyLabelsBoth": {}, "keyLabelsMidi": "Midi", "@keyLabelsMidi": {}, "splitKeyboard": "Geteilte Tastatur", "@splitKeyboard": {}, "resetToDefault": "Zurücksetzen auf Standard", "@resetToDefault": {}, "disableScroll": "Scrollen deaktivieren", "@disableScroll": {}, "languageEn": "Englisch", "@languageEn": {}, "languageDe": "Deutsch", "@languageDe": {}, "languageEs": "Spanisch", "@languageEs": {}, "languageFr": "Französisch", "@languageFr": {}, "languageJa": "Japanisch", "@languageJa": {}, "languageKo": "Koreanisch", "@languageKo": {}, "languageZh": "Chinesisch", "@languageZh": {}, "languageRu": "Русский", "@languageRu": {}, "language": "Sprache", "@language": {} } ================================================ FILE: lib/l10n/app_en.arb ================================================ { "@@locale": "en", "title": "The Pocket Piano", "@title": {}, "sustain": "Sustain", "@sustain": {}, "themeBrightness": "Theme Brightness", "@themeBrightness": {}, "themeBrightnessLight": "Light", "@themeBrightnessLight": {}, "themeBrightnessSystem": "System", "@themeBrightnessSystem": {}, "themeBrightnessDark": "Dark", "@themeBrightnessDark": {}, "themeColor": "Theme Color", "@themeColor": {}, "keySettings": "Key Settings", "@keySettings": {}, "settings": "Settings", "@settings": {}, "keyWidth": "Key Width", "@keyWidth": {}, "invertKeys": "Invert Keys", "@invertKeys": {}, "colorRole": "Color Role", "@colorRole": {}, "colorRolePrimary": "Primary", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "Primary Container", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "Secondary", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "Secondary Container", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "Tertiary", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "Tertiary Container", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "Surface", "@colorRoleSurface": {}, "colorRoleInverseSurface": "Inverse Surface", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "Mono Chrome", "@colorRoleMonoChrome": {}, "keyLabels": "Key Labels", "@keyLabels": {}, "hapticFeedback": "Haptic Feedback", "@hapticFeedback": {}, "keyLabelsNone": "None", "@keyLabelsNone": {}, "keyLabelsSharps": "Sharps", "@keyLabelsSharps": {}, "keyLabelsFlats": "Flats", "@keyLabelsFlats": {}, "keyLabelsBoth": "Both", "@keyLabelsBoth": {}, "keyLabelsMidi": "Midi", "@keyLabelsMidi": {}, "splitKeyboard": "Split Keyboard", "@splitKeyboard": {}, "resetToDefault": "Reset to Default", "@resetToDefault": {}, "disableScroll": "Disable Scroll", "@disableScroll": {}, "languageEn": "English", "@languageEn": {}, "languageDe": "German", "@languageDe": {}, "languageEs": "Spanish", "@languageEs": {}, "languageFr": "French", "@languageFr": {}, "languageJa": "Japanese", "@languageJa": {}, "languageKo": "Korean", "@languageKo": {}, "languageZh": "Chinese", "@languageZh": {}, "languageRu": "Russian", "@languageRu": {}, "language": "Language", "@language": {}, "version": "Version", "@version": {}, "showLicenses": "Show Licenses", "@showLicenses": {}, "webVersion": "Web Version", "@webVersion": {} } ================================================ FILE: lib/l10n/app_es.arb ================================================ { "@@locale": "es", "title": "El piano de bolsillo", "@title": {}, "sustain": "Sostenimiento", "@sustain": {}, "themeBrightness": "Brillo del tema", "@themeBrightness": {}, "themeBrightnessLight": "Claro", "@themeBrightnessLight": {}, "themeBrightnessSystem": "Sistema", "@themeBrightnessSystem": {}, "themeBrightnessDark": "Oscuro", "@themeBrightnessDark": {}, "themeColor": "Color del tema", "@themeColor": {}, "keySettings": "Ajustes de teclas", "@keySettings": {}, "settings": "Ajustes", "@settings": {}, "keyWidth": "Ancho de las teclas", "@keyWidth": {}, "invertKeys": "Invertir teclas", "@invertKeys": {}, "colorRole": "Rol de color", "@colorRole": {}, "colorRolePrimary": "Principal", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "Contenedor principal", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "Secundario", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "Contenedor secundario", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "Terciario", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "Contenedor terciario", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "Superficie", "@colorRoleSurface": {}, "colorRoleInverseSurface": "Superficie inversa", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "Monocromo", "@colorRoleMonoChrome": {}, "keyLabels": "Etiquetas de las teclas", "@keyLabels": {}, "hapticFeedback": "Retroalimentación háptica", "@hapticFeedback": {}, "keyLabelsNone": "Ninguna", "@keyLabelsNone": {}, "keyLabelsSharps": "Sostenidos", "@keyLabelsSharps": {}, "keyLabelsFlats": "Bemoles", "@keyLabelsFlats": {}, "keyLabelsBoth": "Ambos", "@keyLabelsBoth": {}, "keyLabelsMidi": "Midi", "@keyLabelsMidi": {}, "splitKeyboard": "Teclado dividido", "@splitKeyboard": {}, "resetToDefault": "Restablecer a los valores predeterminados", "@resetToDefault": {}, "disableScroll": "Deshabilitar desplazamiento", "@disableScroll": {}, "languageEn": "English", "@languageEn": {}, "languageDe": "Español", "@languageDe": {}, "languageEs": "Español", "@languageEs": {}, "languageFr": "Français", "@languageFr": {}, "languageJa": "Japonés", "@languageJa": {}, "languageKo": "Coreano", "@languageKo": {}, "languageZh": "Chino", "@languageZh": {}, "languageRu": "Ruso", "@languageRu": {}, "language": "Lengua", "@language": {} } ================================================ FILE: lib/l10n/app_fr.arb ================================================ { "@@locale": "fr", "title": "Le Piano de Poche", "@title": {}, "sustain": "Suspension", "@sustain": {}, "themeBrightness": "Luminosité du thème", "@themeBrightness": {}, "themeBrightnessLight": "Clair", "@themeBrightnessLight": {}, "themeBrightnessSystem": "Système", "@themeBrightnessSystem": {}, "themeBrightnessDark": "Sombre", "@themeBrightnessDark": {}, "themeColor": "Couleur du thème", "@themeColor": {}, "keySettings": "Paramètres des touches", "@keySettings": {}, "settings": "Paramètres", "@settings": {}, "keyWidth": "Largeur des touches", "@keyWidth": {}, "invertKeys": "Inverser les touches", "@invertKeys": {}, "colorRole": "Rôle de la couleur", "@colorRole": {}, "colorRolePrimary": "Primaire", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "Conteneur primaire", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "Secondaire", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "Conteneur secondaire", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "Tertiaire", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "Conteneur tertiaire", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "Surface", "@colorRoleSurface": {}, "colorRoleInverseSurface": "Surface inverse", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "Monochrome", "@colorRoleMonoChrome": {}, "keyLabels": "Étiquettes des touches", "@keyLabels": {}, "hapticFeedback": "Rétroaction haptique", "@hapticFeedback": {}, "keyLabelsNone": "Aucune", "@keyLabelsNone": {}, "keyLabelsSharps": "Dièses", "@keyLabelsSharps": {}, "keyLabelsFlats": "Bémols", "@keyLabelsFlats": {}, "keyLabelsBoth": "Les deux", "@keyLabelsBoth": {}, "keyLabelsMidi": "Midi", "@keyLabelsMidi": {}, "splitKeyboard": "Clavier divisé", "@splitKeyboard": {}, "resetToDefault": "Réinitialiser aux valeurs par défaut", "@resetToDefault": {}, "disableScroll": "Désactiver le défilement", "@disableScroll": {}, "languageEn": "Anglais", "@languageEn": {}, "languageDe": "Allemand", "@languageDe": {}, "languageEs": "Espagnol", "@languageEs": {}, "languageFr": "Français", "@languageFr": {}, "languageJa": "Japonais", "@languageJa": {}, "languageKo": "Coréen", "@languageKo": {}, "languageZh": "Chinois", "@languageZh": {}, "languageRu": "Russe", "@languageRu": {}, "language": "Langue", "@language": {} } ================================================ FILE: lib/l10n/app_ja.arb ================================================ { "@@locale": "ja", "title": "ポケットピアノ", "@title": {}, "sustain": "サステイン", "@sustain": {}, "themeBrightness": "テーマの明るさ", "@themeBrightness": {}, "themeBrightnessLight": "明るい", "@themeBrightnessLight": {}, "themeBrightnessSystem": "システム", "@themeBrightnessSystem": {}, "themeBrightnessDark": "暗い", "@themeBrightnessDark": {}, "themeColor": "テーマカラー", "@themeColor": {}, "keySettings": "キー設定", "@keySettings": {}, "settings": "設定", "@settings": {}, "keyWidth": "キーの幅", "@keyWidth": {}, "invertKeys": "キーを反転", "@invertKeys": {}, "colorRole": "カラーロール", "@colorRole": {}, "colorRolePrimary": "プライマリ", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "プライマリコンテナ", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "セカンダリ", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "セカンダリコンテナ", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "三次", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "三次コンテナ", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "表面", "@colorRoleSurface": {}, "colorRoleInverseSurface": "逆表面", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "モノクロ", "@colorRoleMonoChrome": {}, "keyLabels": "キーラベル", "@keyLabels": {}, "hapticFeedback": "触覚フィードバック", "@hapticFeedback": {}, "keyLabelsNone": "なし", "@keyLabelsNone": {}, "keyLabelsSharps": "シャープ", "@keyLabelsSharps": {}, "keyLabelsFlats": "フラット", "@keyLabelsFlats": {}, "keyLabelsBoth": "両方", "@keyLabelsBoth": {}, "keyLabelsMidi": "MIDI", "@keyLabelsMidi": {}, "splitKeyboard": "分割キーボード", "@splitKeyboard": {}, "resetToDefault": "デフォルトにリセット", "@resetToDefault": {}, "disableScroll": "スクロールを無効にする", "@disableScroll": {}, "languageEn": "英語", "@languageEn": {}, "languageDe": "ドイツ語", "@languageDe": {}, "languageEs": "スペイン語", "@languageEs": {}, "languageFr": "フランス語", "@languageFr": {}, "languageJa": "日本語", "@languageJa": {}, "languageKo": "韓国語", "@languageKo": {}, "languageZh": "简体中文", "@languageZh": {}, "languageRu": "Русский", "@languageRu": {}, "language": "言語 (Gengo)", "@language": {} } ================================================ FILE: lib/l10n/app_ko.arb ================================================ { "@@locale": "ko", "title": "포켓 피아노", "@title": {}, "sustain": "서스테인", "@sustain": {}, "themeBrightness": "테마 밝기", "@themeBrightness": {}, "themeBrightnessLight": "밝게", "@themeBrightnessLight": {}, "themeBrightnessSystem": "시스템", "@themeBrightnessSystem": {}, "themeBrightnessDark": "어둡게", "@themeBrightnessDark": {}, "themeColor": "테마 색상", "@themeColor": {}, "keySettings": "키 설정", "@keySettings": {}, "settings": "설정", "@settings": {}, "keyWidth": "키 너비", "@keyWidth": {}, "invertKeys": "키 반전", "@invertKeys": {}, "colorRole": "색상 역할", "@colorRole": {}, "colorRolePrimary": "기본", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "기본 컨테이너", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "보조", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "보조 컨테이너", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "3차", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "3차 컨테이너", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "표면", "@colorRoleSurface": {}, "colorRoleInverseSurface": "역전된 표면", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "모노크롬", "@colorRoleMonoChrome": {}, "keyLabels": "키 레이블", "@keyLabels": {}, "hapticFeedback": "햅틱 피드백", "@hapticFeedback": {}, "keyLabelsNone": "없음", "@keyLabelsNone": {}, "keyLabelsSharps": "샵", "@keyLabelsSharps": {}, "keyLabelsFlats": "플랫", "@keyLabelsFlats": {}, "keyLabelsBoth": "모두", "@keyLabelsBoth": {}, "keyLabelsMidi": "미디", "@keyLabelsMidi": {}, "splitKeyboard": "분할 키보드", "@splitKeyboard": {}, "resetToDefault": "기본값으로 재설정", "@resetToDefault": {}, "disableScroll": "스크롤 비활성화", "@disableScroll": {}, "languageEn": "영어", "@languageEn": {}, "languageDe": "독일어", "@languageDe": {}, "languageEs": "스페인어", "@languageEs": {}, "languageFr": "프랑스어", "@languageFr": {}, "languageJa": "일본어", "@languageJa": {}, "languageKo": "한국어", "@languageKo": {}, "languageZh": "중국어", "@languageZh": {}, "languageRu": "러시아어", "@languageRu": {}, "language": "언어 (Eongeo)", "@language": {} } ================================================ FILE: lib/l10n/app_localizations.dart ================================================ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:intl/intl.dart' as intl; import 'app_localizations_de.dart'; import 'app_localizations_en.dart'; import 'app_localizations_es.dart'; import 'app_localizations_fr.dart'; import 'app_localizations_ja.dart'; import 'app_localizations_ko.dart'; import 'app_localizations_ru.dart'; import 'app_localizations_zh.dart'; // ignore_for_file: type=lint /// Callers can lookup localized strings with an instance of AppLocalizations /// returned by `AppLocalizations.of(context)`. /// /// Applications need to include `AppLocalizations.delegate()` in their app's /// `localizationDelegates` list, and the locales they support in the app's /// `supportedLocales` list. For example: /// /// ```dart /// import 'l10n/app_localizations.dart'; /// /// return MaterialApp( /// localizationsDelegates: AppLocalizations.localizationsDelegates, /// supportedLocales: AppLocalizations.supportedLocales, /// home: MyApplicationHome(), /// ); /// ``` /// /// ## Update pubspec.yaml /// /// Please make sure to update your pubspec.yaml to include the following /// packages: /// /// ```yaml /// dependencies: /// # Internationalization support. /// flutter_localizations: /// sdk: flutter /// intl: any # Use the pinned version from flutter_localizations /// /// # Rest of dependencies /// ``` /// /// ## iOS Applications /// /// iOS applications define key application metadata, including supported /// locales, in an Info.plist file that is built into the application bundle. /// To configure the locales supported by your app, you’ll need to edit this /// file. /// /// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. /// Then, in the Project Navigator, open the Info.plist file under the Runner /// project’s Runner folder. /// /// Next, select the Information Property List item, select Add Item from the /// Editor menu, then select Localizations from the pop-up menu. /// /// Select and expand the newly-created Localizations item then, for each /// locale your application supports, add a new item and select the locale /// you wish to add from the pop-up menu in the Value field. This list should /// be consistent with the languages listed in the AppLocalizations.supportedLocales /// property. abstract class AppLocalizations { AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); final String localeName; static AppLocalizations? of(BuildContext context) { return Localizations.of(context, AppLocalizations); } static const LocalizationsDelegate delegate = _AppLocalizationsDelegate(); /// A list of this localizations delegate along with the default localizations /// delegates. /// /// Returns a list of localizations delegates containing this delegate along with /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, /// and GlobalWidgetsLocalizations.delegate. /// /// Additional delegates can be added by appending to this list in /// MaterialApp. This list does not have to be used at all if a custom list /// of delegates is preferred or required. static const List> localizationsDelegates = >[ delegate, GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ]; /// A list of this localizations delegate's supported locales. static const List supportedLocales = [ Locale('de'), Locale('en'), Locale('es'), Locale('fr'), Locale('ja'), Locale('ko'), Locale('ru'), Locale('zh') ]; /// No description provided for @title. /// /// In en, this message translates to: /// **'The Pocket Piano'** String get title; /// No description provided for @sustain. /// /// In en, this message translates to: /// **'Sustain'** String get sustain; /// No description provided for @themeBrightness. /// /// In en, this message translates to: /// **'Theme Brightness'** String get themeBrightness; /// No description provided for @themeBrightnessLight. /// /// In en, this message translates to: /// **'Light'** String get themeBrightnessLight; /// No description provided for @themeBrightnessSystem. /// /// In en, this message translates to: /// **'System'** String get themeBrightnessSystem; /// No description provided for @themeBrightnessDark. /// /// In en, this message translates to: /// **'Dark'** String get themeBrightnessDark; /// No description provided for @themeColor. /// /// In en, this message translates to: /// **'Theme Color'** String get themeColor; /// No description provided for @keySettings. /// /// In en, this message translates to: /// **'Key Settings'** String get keySettings; /// No description provided for @settings. /// /// In en, this message translates to: /// **'Settings'** String get settings; /// No description provided for @keyWidth. /// /// In en, this message translates to: /// **'Key Width'** String get keyWidth; /// No description provided for @invertKeys. /// /// In en, this message translates to: /// **'Invert Keys'** String get invertKeys; /// No description provided for @colorRole. /// /// In en, this message translates to: /// **'Color Role'** String get colorRole; /// No description provided for @colorRolePrimary. /// /// In en, this message translates to: /// **'Primary'** String get colorRolePrimary; /// No description provided for @colorRolePrimaryContainer. /// /// In en, this message translates to: /// **'Primary Container'** String get colorRolePrimaryContainer; /// No description provided for @colorRoleSecondary. /// /// In en, this message translates to: /// **'Secondary'** String get colorRoleSecondary; /// No description provided for @colorRoleSecondaryContainer. /// /// In en, this message translates to: /// **'Secondary Container'** String get colorRoleSecondaryContainer; /// No description provided for @colorRoleTertiary. /// /// In en, this message translates to: /// **'Tertiary'** String get colorRoleTertiary; /// No description provided for @colorRoleTertiaryContainer. /// /// In en, this message translates to: /// **'Tertiary Container'** String get colorRoleTertiaryContainer; /// No description provided for @colorRoleSurface. /// /// In en, this message translates to: /// **'Surface'** String get colorRoleSurface; /// No description provided for @colorRoleInverseSurface. /// /// In en, this message translates to: /// **'Inverse Surface'** String get colorRoleInverseSurface; /// No description provided for @colorRoleMonoChrome. /// /// In en, this message translates to: /// **'Mono Chrome'** String get colorRoleMonoChrome; /// No description provided for @keyLabels. /// /// In en, this message translates to: /// **'Key Labels'** String get keyLabels; /// No description provided for @hapticFeedback. /// /// In en, this message translates to: /// **'Haptic Feedback'** String get hapticFeedback; /// No description provided for @keyLabelsNone. /// /// In en, this message translates to: /// **'None'** String get keyLabelsNone; /// No description provided for @keyLabelsSharps. /// /// In en, this message translates to: /// **'Sharps'** String get keyLabelsSharps; /// No description provided for @keyLabelsFlats. /// /// In en, this message translates to: /// **'Flats'** String get keyLabelsFlats; /// No description provided for @keyLabelsBoth. /// /// In en, this message translates to: /// **'Both'** String get keyLabelsBoth; /// No description provided for @keyLabelsMidi. /// /// In en, this message translates to: /// **'Midi'** String get keyLabelsMidi; /// No description provided for @splitKeyboard. /// /// In en, this message translates to: /// **'Split Keyboard'** String get splitKeyboard; /// No description provided for @resetToDefault. /// /// In en, this message translates to: /// **'Reset to Default'** String get resetToDefault; /// No description provided for @disableScroll. /// /// In en, this message translates to: /// **'Disable Scroll'** String get disableScroll; /// No description provided for @languageEn. /// /// In en, this message translates to: /// **'English'** String get languageEn; /// No description provided for @languageDe. /// /// In en, this message translates to: /// **'German'** String get languageDe; /// No description provided for @languageEs. /// /// In en, this message translates to: /// **'Spanish'** String get languageEs; /// No description provided for @languageFr. /// /// In en, this message translates to: /// **'French'** String get languageFr; /// No description provided for @languageJa. /// /// In en, this message translates to: /// **'Japanese'** String get languageJa; /// No description provided for @languageKo. /// /// In en, this message translates to: /// **'Korean'** String get languageKo; /// No description provided for @languageZh. /// /// In en, this message translates to: /// **'Chinese'** String get languageZh; /// No description provided for @languageRu. /// /// In en, this message translates to: /// **'Russian'** String get languageRu; /// No description provided for @language. /// /// In en, this message translates to: /// **'Language'** String get language; /// No description provided for @version. /// /// In en, this message translates to: /// **'Version'** String get version; /// No description provided for @showLicenses. /// /// In en, this message translates to: /// **'Show Licenses'** String get showLicenses; /// No description provided for @webVersion. /// /// In en, this message translates to: /// **'Web Version'** String get webVersion; } class _AppLocalizationsDelegate extends LocalizationsDelegate { const _AppLocalizationsDelegate(); @override Future load(Locale locale) { return SynchronousFuture(lookupAppLocalizations(locale)); } @override bool isSupported(Locale locale) => [ 'de', 'en', 'es', 'fr', 'ja', 'ko', 'ru', 'zh' ].contains(locale.languageCode); @override bool shouldReload(_AppLocalizationsDelegate old) => false; } AppLocalizations lookupAppLocalizations(Locale locale) { // Lookup logic when only language code is specified. switch (locale.languageCode) { case 'de': return AppLocalizationsDe(); case 'en': return AppLocalizationsEn(); case 'es': return AppLocalizationsEs(); case 'fr': return AppLocalizationsFr(); case 'ja': return AppLocalizationsJa(); case 'ko': return AppLocalizationsKo(); case 'ru': return AppLocalizationsRu(); case 'zh': return AppLocalizationsZh(); } throw FlutterError( 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' 'an issue with the localizations generation tool. Please file an issue ' 'on GitHub with a reproducible sample app and the gen-l10n configuration ' 'that was used.'); } ================================================ FILE: lib/l10n/app_localizations_de.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for German (`de`). class AppLocalizationsDe extends AppLocalizations { AppLocalizationsDe([String locale = 'de']) : super(locale); @override String get title => 'Die Taschenpiano'; @override String get sustain => 'Anschlag'; @override String get themeBrightness => 'Themenhelligkeit'; @override String get themeBrightnessLight => 'Hell'; @override String get themeBrightnessSystem => 'System'; @override String get themeBrightnessDark => 'Dunkel'; @override String get themeColor => 'Themenfarbe'; @override String get keySettings => 'Tasteneinstellungen'; @override String get settings => 'Einstellungen'; @override String get keyWidth => 'Tastenbreite'; @override String get invertKeys => 'Tasten invertieren'; @override String get colorRole => 'Farbrolle'; @override String get colorRolePrimary => 'Primär'; @override String get colorRolePrimaryContainer => 'Primärer Container'; @override String get colorRoleSecondary => 'Sekundär'; @override String get colorRoleSecondaryContainer => 'Sekundärer Container'; @override String get colorRoleTertiary => 'Tertiär'; @override String get colorRoleTertiaryContainer => 'Tertiärer Container'; @override String get colorRoleSurface => 'Oberfläche'; @override String get colorRoleInverseSurface => 'Inverse Oberfläche'; @override String get colorRoleMonoChrome => 'Monochrom'; @override String get keyLabels => 'Tastenbeschriftungen'; @override String get hapticFeedback => 'Haptisches Feedback'; @override String get keyLabelsNone => 'Keine'; @override String get keyLabelsSharps => 'Kreuzzeichen'; @override String get keyLabelsFlats => 'Bleistifte'; @override String get keyLabelsBoth => 'Beide'; @override String get keyLabelsMidi => 'Midi'; @override String get splitKeyboard => 'Geteilte Tastatur'; @override String get resetToDefault => 'Zurücksetzen auf Standard'; @override String get disableScroll => 'Scrollen deaktivieren'; @override String get languageEn => 'Englisch'; @override String get languageDe => 'Deutsch'; @override String get languageEs => 'Spanisch'; @override String get languageFr => 'Französisch'; @override String get languageJa => 'Japanisch'; @override String get languageKo => 'Koreanisch'; @override String get languageZh => 'Chinesisch'; @override String get languageRu => 'Русский'; @override String get language => 'Sprache'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_localizations_en.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for English (`en`). class AppLocalizationsEn extends AppLocalizations { AppLocalizationsEn([String locale = 'en']) : super(locale); @override String get title => 'The Pocket Piano'; @override String get sustain => 'Sustain'; @override String get themeBrightness => 'Theme Brightness'; @override String get themeBrightnessLight => 'Light'; @override String get themeBrightnessSystem => 'System'; @override String get themeBrightnessDark => 'Dark'; @override String get themeColor => 'Theme Color'; @override String get keySettings => 'Key Settings'; @override String get settings => 'Settings'; @override String get keyWidth => 'Key Width'; @override String get invertKeys => 'Invert Keys'; @override String get colorRole => 'Color Role'; @override String get colorRolePrimary => 'Primary'; @override String get colorRolePrimaryContainer => 'Primary Container'; @override String get colorRoleSecondary => 'Secondary'; @override String get colorRoleSecondaryContainer => 'Secondary Container'; @override String get colorRoleTertiary => 'Tertiary'; @override String get colorRoleTertiaryContainer => 'Tertiary Container'; @override String get colorRoleSurface => 'Surface'; @override String get colorRoleInverseSurface => 'Inverse Surface'; @override String get colorRoleMonoChrome => 'Mono Chrome'; @override String get keyLabels => 'Key Labels'; @override String get hapticFeedback => 'Haptic Feedback'; @override String get keyLabelsNone => 'None'; @override String get keyLabelsSharps => 'Sharps'; @override String get keyLabelsFlats => 'Flats'; @override String get keyLabelsBoth => 'Both'; @override String get keyLabelsMidi => 'Midi'; @override String get splitKeyboard => 'Split Keyboard'; @override String get resetToDefault => 'Reset to Default'; @override String get disableScroll => 'Disable Scroll'; @override String get languageEn => 'English'; @override String get languageDe => 'German'; @override String get languageEs => 'Spanish'; @override String get languageFr => 'French'; @override String get languageJa => 'Japanese'; @override String get languageKo => 'Korean'; @override String get languageZh => 'Chinese'; @override String get languageRu => 'Russian'; @override String get language => 'Language'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_localizations_es.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for Spanish Castilian (`es`). class AppLocalizationsEs extends AppLocalizations { AppLocalizationsEs([String locale = 'es']) : super(locale); @override String get title => 'El piano de bolsillo'; @override String get sustain => 'Sostenimiento'; @override String get themeBrightness => 'Brillo del tema'; @override String get themeBrightnessLight => 'Claro'; @override String get themeBrightnessSystem => 'Sistema'; @override String get themeBrightnessDark => 'Oscuro'; @override String get themeColor => 'Color del tema'; @override String get keySettings => 'Ajustes de teclas'; @override String get settings => 'Ajustes'; @override String get keyWidth => 'Ancho de las teclas'; @override String get invertKeys => 'Invertir teclas'; @override String get colorRole => 'Rol de color'; @override String get colorRolePrimary => 'Principal'; @override String get colorRolePrimaryContainer => 'Contenedor principal'; @override String get colorRoleSecondary => 'Secundario'; @override String get colorRoleSecondaryContainer => 'Contenedor secundario'; @override String get colorRoleTertiary => 'Terciario'; @override String get colorRoleTertiaryContainer => 'Contenedor terciario'; @override String get colorRoleSurface => 'Superficie'; @override String get colorRoleInverseSurface => 'Superficie inversa'; @override String get colorRoleMonoChrome => 'Monocromo'; @override String get keyLabels => 'Etiquetas de las teclas'; @override String get hapticFeedback => 'Retroalimentación háptica'; @override String get keyLabelsNone => 'Ninguna'; @override String get keyLabelsSharps => 'Sostenidos'; @override String get keyLabelsFlats => 'Bemoles'; @override String get keyLabelsBoth => 'Ambos'; @override String get keyLabelsMidi => 'Midi'; @override String get splitKeyboard => 'Teclado dividido'; @override String get resetToDefault => 'Restablecer a los valores predeterminados'; @override String get disableScroll => 'Deshabilitar desplazamiento'; @override String get languageEn => 'English'; @override String get languageDe => 'Español'; @override String get languageEs => 'Español'; @override String get languageFr => 'Français'; @override String get languageJa => 'Japonés'; @override String get languageKo => 'Coreano'; @override String get languageZh => 'Chino'; @override String get languageRu => 'Ruso'; @override String get language => 'Lengua'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_localizations_fr.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for French (`fr`). class AppLocalizationsFr extends AppLocalizations { AppLocalizationsFr([String locale = 'fr']) : super(locale); @override String get title => 'Le Piano de Poche'; @override String get sustain => 'Suspension'; @override String get themeBrightness => 'Luminosité du thème'; @override String get themeBrightnessLight => 'Clair'; @override String get themeBrightnessSystem => 'Système'; @override String get themeBrightnessDark => 'Sombre'; @override String get themeColor => 'Couleur du thème'; @override String get keySettings => 'Paramètres des touches'; @override String get settings => 'Paramètres'; @override String get keyWidth => 'Largeur des touches'; @override String get invertKeys => 'Inverser les touches'; @override String get colorRole => 'Rôle de la couleur'; @override String get colorRolePrimary => 'Primaire'; @override String get colorRolePrimaryContainer => 'Conteneur primaire'; @override String get colorRoleSecondary => 'Secondaire'; @override String get colorRoleSecondaryContainer => 'Conteneur secondaire'; @override String get colorRoleTertiary => 'Tertiaire'; @override String get colorRoleTertiaryContainer => 'Conteneur tertiaire'; @override String get colorRoleSurface => 'Surface'; @override String get colorRoleInverseSurface => 'Surface inverse'; @override String get colorRoleMonoChrome => 'Monochrome'; @override String get keyLabels => 'Étiquettes des touches'; @override String get hapticFeedback => 'Rétroaction haptique'; @override String get keyLabelsNone => 'Aucune'; @override String get keyLabelsSharps => 'Dièses'; @override String get keyLabelsFlats => 'Bémols'; @override String get keyLabelsBoth => 'Les deux'; @override String get keyLabelsMidi => 'Midi'; @override String get splitKeyboard => 'Clavier divisé'; @override String get resetToDefault => 'Réinitialiser aux valeurs par défaut'; @override String get disableScroll => 'Désactiver le défilement'; @override String get languageEn => 'Anglais'; @override String get languageDe => 'Allemand'; @override String get languageEs => 'Espagnol'; @override String get languageFr => 'Français'; @override String get languageJa => 'Japonais'; @override String get languageKo => 'Coréen'; @override String get languageZh => 'Chinois'; @override String get languageRu => 'Russe'; @override String get language => 'Langue'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_localizations_ja.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for Japanese (`ja`). class AppLocalizationsJa extends AppLocalizations { AppLocalizationsJa([String locale = 'ja']) : super(locale); @override String get title => 'ポケットピアノ'; @override String get sustain => 'サステイン'; @override String get themeBrightness => 'テーマの明るさ'; @override String get themeBrightnessLight => '明るい'; @override String get themeBrightnessSystem => 'システム'; @override String get themeBrightnessDark => '暗い'; @override String get themeColor => 'テーマカラー'; @override String get keySettings => 'キー設定'; @override String get settings => '設定'; @override String get keyWidth => 'キーの幅'; @override String get invertKeys => 'キーを反転'; @override String get colorRole => 'カラーロール'; @override String get colorRolePrimary => 'プライマリ'; @override String get colorRolePrimaryContainer => 'プライマリコンテナ'; @override String get colorRoleSecondary => 'セカンダリ'; @override String get colorRoleSecondaryContainer => 'セカンダリコンテナ'; @override String get colorRoleTertiary => '三次'; @override String get colorRoleTertiaryContainer => '三次コンテナ'; @override String get colorRoleSurface => '表面'; @override String get colorRoleInverseSurface => '逆表面'; @override String get colorRoleMonoChrome => 'モノクロ'; @override String get keyLabels => 'キーラベル'; @override String get hapticFeedback => '触覚フィードバック'; @override String get keyLabelsNone => 'なし'; @override String get keyLabelsSharps => 'シャープ'; @override String get keyLabelsFlats => 'フラット'; @override String get keyLabelsBoth => '両方'; @override String get keyLabelsMidi => 'MIDI'; @override String get splitKeyboard => '分割キーボード'; @override String get resetToDefault => 'デフォルトにリセット'; @override String get disableScroll => 'スクロールを無効にする'; @override String get languageEn => '英語'; @override String get languageDe => 'ドイツ語'; @override String get languageEs => 'スペイン語'; @override String get languageFr => 'フランス語'; @override String get languageJa => '日本語'; @override String get languageKo => '韓国語'; @override String get languageZh => '简体中文'; @override String get languageRu => 'Русский'; @override String get language => '言語 (Gengo)'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_localizations_ko.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for Korean (`ko`). class AppLocalizationsKo extends AppLocalizations { AppLocalizationsKo([String locale = 'ko']) : super(locale); @override String get title => '포켓 피아노'; @override String get sustain => '서스테인'; @override String get themeBrightness => '테마 밝기'; @override String get themeBrightnessLight => '밝게'; @override String get themeBrightnessSystem => '시스템'; @override String get themeBrightnessDark => '어둡게'; @override String get themeColor => '테마 색상'; @override String get keySettings => '키 설정'; @override String get settings => '설정'; @override String get keyWidth => '키 너비'; @override String get invertKeys => '키 반전'; @override String get colorRole => '색상 역할'; @override String get colorRolePrimary => '기본'; @override String get colorRolePrimaryContainer => '기본 컨테이너'; @override String get colorRoleSecondary => '보조'; @override String get colorRoleSecondaryContainer => '보조 컨테이너'; @override String get colorRoleTertiary => '3차'; @override String get colorRoleTertiaryContainer => '3차 컨테이너'; @override String get colorRoleSurface => '표면'; @override String get colorRoleInverseSurface => '역전된 표면'; @override String get colorRoleMonoChrome => '모노크롬'; @override String get keyLabels => '키 레이블'; @override String get hapticFeedback => '햅틱 피드백'; @override String get keyLabelsNone => '없음'; @override String get keyLabelsSharps => '샵'; @override String get keyLabelsFlats => '플랫'; @override String get keyLabelsBoth => '모두'; @override String get keyLabelsMidi => '미디'; @override String get splitKeyboard => '분할 키보드'; @override String get resetToDefault => '기본값으로 재설정'; @override String get disableScroll => '스크롤 비활성화'; @override String get languageEn => '영어'; @override String get languageDe => '독일어'; @override String get languageEs => '스페인어'; @override String get languageFr => '프랑스어'; @override String get languageJa => '일본어'; @override String get languageKo => '한국어'; @override String get languageZh => '중국어'; @override String get languageRu => '러시아어'; @override String get language => '언어 (Eongeo)'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_localizations_ru.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for Russian (`ru`). class AppLocalizationsRu extends AppLocalizations { AppLocalizationsRu([String locale = 'ru']) : super(locale); @override String get title => 'Карманный фортепиано'; @override String get sustain => 'Стойка'; @override String get themeBrightness => 'Яркость темы'; @override String get themeBrightnessLight => 'Светлая'; @override String get themeBrightnessSystem => 'Система'; @override String get themeBrightnessDark => 'Темная'; @override String get themeColor => 'Цвет темы'; @override String get keySettings => 'Настройки клавиш'; @override String get settings => 'Настройки'; @override String get keyWidth => 'Ширина клавиши'; @override String get invertKeys => 'Инвертировать клавиши'; @override String get colorRole => 'Роль цвета'; @override String get colorRolePrimary => 'Основной'; @override String get colorRolePrimaryContainer => 'Основной контейнер'; @override String get colorRoleSecondary => 'Вторичный'; @override String get colorRoleSecondaryContainer => 'Вторичный контейнер'; @override String get colorRoleTertiary => 'Третичный'; @override String get colorRoleTertiaryContainer => 'Третичный контейнер'; @override String get colorRoleSurface => 'Поверхность'; @override String get colorRoleInverseSurface => 'Обратная поверхность'; @override String get colorRoleMonoChrome => 'Монохромный'; @override String get keyLabels => 'Этикетки клавиш'; @override String get hapticFeedback => 'Обратная тактильная связь'; @override String get keyLabelsNone => 'Нет'; @override String get keyLabelsSharps => 'Диезы'; @override String get keyLabelsFlats => 'Бемолы'; @override String get keyLabelsBoth => 'Оба'; @override String get keyLabelsMidi => 'МиДи'; @override String get splitKeyboard => 'Разделенный клавиатура'; @override String get resetToDefault => 'Сбросить к значениям по умолчанию'; @override String get disableScroll => 'Отключить прокрутку'; @override String get languageEn => 'Английский'; @override String get languageDe => 'Немецкий'; @override String get languageEs => 'Испанский'; @override String get languageFr => 'Французский'; @override String get languageJa => 'Японский'; @override String get languageKo => 'Корейский'; @override String get languageZh => 'Китайский'; @override String get languageRu => 'Русский'; @override String get language => 'Язык'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_localizations_zh.dart ================================================ // ignore: unused_import import 'package:intl/intl.dart' as intl; import 'app_localizations.dart'; // ignore_for_file: type=lint /// The translations for Chinese (`zh`). class AppLocalizationsZh extends AppLocalizations { AppLocalizationsZh([String locale = 'zh']) : super(locale); @override String get title => '口袋钢琴'; @override String get sustain => '延音'; @override String get themeBrightness => '主题亮度'; @override String get themeBrightnessLight => '明亮'; @override String get themeBrightnessSystem => '系统'; @override String get themeBrightnessDark => '深色'; @override String get themeColor => '主题颜色'; @override String get keySettings => '按键设置'; @override String get settings => '设置'; @override String get keyWidth => '按键宽度'; @override String get invertKeys => '反转按键'; @override String get colorRole => '颜色角色'; @override String get colorRolePrimary => '主要'; @override String get colorRolePrimaryContainer => '主要容器'; @override String get colorRoleSecondary => '次要'; @override String get colorRoleSecondaryContainer => '次要容器'; @override String get colorRoleTertiary => '三级'; @override String get colorRoleTertiaryContainer => '三级容器'; @override String get colorRoleSurface => '表面'; @override String get colorRoleInverseSurface => '反向表面'; @override String get colorRoleMonoChrome => '单色'; @override String get keyLabels => '按键标签'; @override String get hapticFeedback => '触觉反馈'; @override String get keyLabelsNone => '无'; @override String get keyLabelsSharps => '升号'; @override String get keyLabelsFlats => '降号'; @override String get keyLabelsBoth => '两者都'; @override String get keyLabelsMidi => 'MIDI'; @override String get splitKeyboard => '分屏键盘'; @override String get resetToDefault => '恢复默认值'; @override String get disableScroll => '禁用滚动'; @override String get languageEn => '英语'; @override String get languageDe => '德语'; @override String get languageEs => '西班牙语'; @override String get languageFr => '法语'; @override String get languageJa => '日语'; @override String get languageKo => '韩语'; @override String get languageZh => '简体中'; @override String get languageRu => '俄语'; @override String get language => '语言 (Yǔyán)'; @override String get version => 'Version'; @override String get showLicenses => 'Show Licenses'; @override String get webVersion => 'Web Version'; } ================================================ FILE: lib/l10n/app_ru.arb ================================================ { "@@locale": "ru", "title": "Карманный фортепиано", "@title": {}, "sustain": "Стойка", "@sustain": {}, "themeBrightness": "Яркость темы", "@themeBrightness": {}, "themeBrightnessLight": "Светлая", "@themeBrightnessLight": {}, "themeBrightnessSystem": "Система", "@themeBrightnessSystem": {}, "themeBrightnessDark": "Темная", "@themeBrightnessDark": {}, "themeColor": "Цвет темы", "@themeColor": {}, "keySettings": "Настройки клавиш", "@keySettings": {}, "settings": "Настройки", "@settings": {}, "keyWidth": "Ширина клавиши", "@keyWidth": {}, "invertKeys": "Инвертировать клавиши", "@invertKeys": {}, "colorRole": "Роль цвета", "@colorRole": {}, "colorRolePrimary": "Основной", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "Основной контейнер", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "Вторичный", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "Вторичный контейнер", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "Третичный", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "Третичный контейнер", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "Поверхность", "@colorRoleSurface": {}, "colorRoleInverseSurface": "Обратная поверхность", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "Монохромный", "@colorRoleMonoChrome": {}, "keyLabels": "Этикетки клавиш", "@keyLabels": {}, "hapticFeedback": "Обратная тактильная связь", "@hapticFeedback": {}, "keyLabelsNone": "Нет", "@keyLabelsNone": {}, "keyLabelsSharps": "Диезы", "@keyLabelsSharps": {}, "keyLabelsFlats": "Бемолы", "@keyLabelsFlats": {}, "keyLabelsBoth": "Оба", "@keyLabelsBoth": {}, "keyLabelsMidi": "МиДи", "@keyLabelsMidi": {}, "splitKeyboard": "Разделенный клавиатура", "@splitKeyboard": {}, "resetToDefault": "Сбросить к значениям по умолчанию", "@resetToDefault": {}, "disableScroll": "Отключить прокрутку", "@disableScroll": {}, "languageEn": "Английский", "@languageEn": {}, "languageDe": "Немецкий", "@languageDe": {}, "languageEs": "Испанский", "@languageEs": {}, "languageFr": "Французский", "@languageFr": {}, "languageJa": "Японский", "@languageJa": {}, "languageKo": "Корейский", "@languageKo": {}, "languageZh": "Китайский", "@languageZh": {}, "languageRu": "Русский", "@languageRu": {}, "language": "Язык", "@language": {} } ================================================ FILE: lib/l10n/app_zh.arb ================================================ { "@@locale": "zh", "title": "口袋钢琴", "@title": {}, "sustain": "延音", "@sustain": {}, "themeBrightness": "主题亮度", "@themeBrightness": {}, "themeBrightnessLight": "明亮", "@themeBrightnessLight": {}, "themeBrightnessSystem": "系统", "@themeBrightnessSystem": {}, "themeBrightnessDark": "深色", "@themeBrightnessDark": {}, "themeColor": "主题颜色", "@themeColor": {}, "keySettings": "按键设置", "@keySettings": {}, "settings": "设置", "@settings": {}, "keyWidth": "按键宽度", "@keyWidth": {}, "invertKeys": "反转按键", "@invertKeys": {}, "colorRole": "颜色角色", "@colorRole": {}, "colorRolePrimary": "主要", "@colorRolePrimary": {}, "colorRolePrimaryContainer": "主要容器", "@colorRolePrimaryContainer": {}, "colorRoleSecondary": "次要", "@colorRoleSecondary": {}, "colorRoleSecondaryContainer": "次要容器", "@colorRoleSecondaryContainer": {}, "colorRoleTertiary": "三级", "@colorRoleTertiary": {}, "colorRoleTertiaryContainer": "三级容器", "@colorRoleTertiaryContainer": {}, "colorRoleSurface": "表面", "@colorRoleSurface": {}, "colorRoleInverseSurface": "反向表面", "@colorRoleInverseSurface": {}, "colorRoleMonoChrome": "单色", "@colorRoleMonoChrome": {}, "keyLabels": "按键标签", "@keyLabels": {}, "hapticFeedback": "触觉反馈", "@hapticFeedback": {}, "keyLabelsNone": "无", "@keyLabelsNone": {}, "keyLabelsSharps": "升号", "@keyLabelsSharps": {}, "keyLabelsFlats": "降号", "@keyLabelsFlats": {}, "keyLabelsBoth": "两者都", "@keyLabelsBoth": {}, "keyLabelsMidi": "MIDI", "@keyLabelsMidi": {}, "splitKeyboard": "分屏键盘", "@splitKeyboard": {}, "resetToDefault": "恢复默认值", "@resetToDefault": {}, "disableScroll": "禁用滚动", "@disableScroll": {}, "languageEn": "英语", "@languageEn": {}, "languageDe": "德语", "@languageDe": {}, "languageEs": "西班牙语", "@languageEs": {}, "languageFr": "法语", "@languageFr": {}, "languageJa": "日语", "@languageJa": {}, "languageKo": "韩语", "@languageKo": {}, "languageZh": "简体中", "@languageZh": {}, "languageRu": "俄语", "@languageRu": {}, "language": "语言 (Yǔyán)", "@language": {} } ================================================ FILE: lib/main.dart ================================================ import 'package:flutter/material.dart'; import 'src/services/injection.dart'; import 'ui/screens/app.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await configureDependencies(); runApp(const ThePocketPiano()); } ================================================ FILE: lib/src/models/settings_models.dart ================================================ import 'package:flutter/material.dart'; enum ColorRole { primary, primaryContainer, secondary, secondaryContainer, tertiary, tertiaryContainer, surface, inverseSurface, monoChrome, } enum PitchLabels { none, sharps, flats, both, midi, } extension ColorSchemeUtils on ColorScheme { Color color(ColorRole role) { switch (role) { case ColorRole.primary: return primary; case ColorRole.primaryContainer: return primaryContainer; case ColorRole.secondary: return secondary; case ColorRole.secondaryContainer: return secondaryContainer; case ColorRole.tertiary: return tertiary; case ColorRole.tertiaryContainer: return tertiaryContainer; case ColorRole.surface: return surface; case ColorRole.inverseSurface: return inverseSurface; case ColorRole.monoChrome: return Colors.black; } } Color onColor(ColorRole role) { switch (role) { case ColorRole.primary: return onPrimary; case ColorRole.primaryContainer: return onPrimaryContainer; case ColorRole.secondary: return onSecondary; case ColorRole.secondaryContainer: return onSecondaryContainer; case ColorRole.tertiary: return onTertiary; case ColorRole.tertiaryContainer: return onTertiaryContainer; case ColorRole.surface: return onSurface; case ColorRole.inverseSurface: return onInverseSurface; case ColorRole.monoChrome: return Colors.white; } } } extension MidiPitchName on int { String pitchName(PitchLabels type) { if (type == PitchLabels.midi) { return '$this'; } if (type != PitchLabels.none) { final octave = (this / 12).floor() - 1; final pitchClass = this % 12; final flats = type == PitchLabels.flats || type == PitchLabels.both; final sharps = type == PitchLabels.sharps || type == PitchLabels.both; final both = type == PitchLabels.both; switch (pitchClass) { case 0: return 'C$octave'; case 1: return both ? 'C♯/D♭$octave' : (sharps ? 'C♯$octave' : 'D♭$octave'); case 2: return 'D$octave'; case 3: return both ? 'D♯/E♭$octave' : (flats ? 'E♭$octave' : 'D♯$octave'); case 4: return 'E$octave'; case 5: return 'F$octave'; case 6: return both ? 'F♯/G♭$octave' : (sharps ? 'F♯$octave' : 'G♭$octave'); case 7: return 'G$octave'; case 8: return both ? 'G♯/A♭$octave' : (flats ? 'A♭$octave' : 'G♯$octave'); case 9: return 'A$octave'; case 10: return both ? 'A♯/B♭$octave' : (flats ? 'B♭$octave' : 'A♯$octave'); case 11: return 'B$octave'; default: } } return ''; } } ================================================ FILE: lib/src/services/audio/pcm_audio_player.dart ================================================ import 'package:dart_melty_soundfont/array_int16.dart'; import 'pcm_audio_player_stub.dart' if (dart.library.io) 'pcm_audio_player_native.dart' if (dart.library.js_interop) 'pcm_audio_player_web.dart'; abstract class PcmAudioPlayer { factory PcmAudioPlayer() => getPcmAudioPlayer(); Future setup({required int sampleRate, required int channelCount}); Future play(); Future pause(); Future release(); void setFeedCallback(void Function(int frames) onFeed); Future feed(ArrayInt16 buffer); } ================================================ FILE: lib/src/services/audio/pcm_audio_player_native.dart ================================================ import 'package:flutter_pcm_sound/flutter_pcm_sound.dart'; import 'package:dart_melty_soundfont/array_int16.dart'; import 'pcm_audio_player.dart'; PcmAudioPlayer getPcmAudioPlayer() => NativePcmAudioPlayer(); class NativePcmAudioPlayer implements PcmAudioPlayer { @override Future setup({required int sampleRate, required int channelCount}) async { await FlutterPcmSound.setLogLevel(LogLevel.standard); await FlutterPcmSound.setFeedThreshold(2000); await FlutterPcmSound.setup(sampleRate: sampleRate, channelCount: channelCount); } @override Future play() async { FlutterPcmSound.start(); } @override Future pause() async { // Unsupported natively } @override Future release() => FlutterPcmSound.release(); @override void setFeedCallback(void Function(int frames) onFeed) { FlutterPcmSound.setFeedCallback(onFeed); } @override Future feed(ArrayInt16 buffer) async { await FlutterPcmSound.feed(PcmArrayInt16(bytes: buffer.bytes)); } } ================================================ FILE: lib/src/services/audio/pcm_audio_player_stub.dart ================================================ import 'pcm_audio_player.dart'; PcmAudioPlayer getPcmAudioPlayer() { throw UnsupportedError( 'Cannot create a PcmAudioPlayer without dart:js_interop or dart:io.', ); } ================================================ FILE: lib/src/services/audio/pcm_audio_player_web.dart ================================================ import 'dart:js_interop'; import 'dart:typed_data'; import 'package:web/web.dart' as web; import 'package:dart_melty_soundfont/array_int16.dart'; import 'pcm_audio_player.dart'; PcmAudioPlayer getPcmAudioPlayer() => WebPcmAudioPlayer(); class WebPcmAudioPlayer implements PcmAudioPlayer { web.AudioContext? _audioContext; web.ScriptProcessorNode? _scriptNode; void Function(int frames)? _onFeed; final List _bufferQueue = []; @override Future setup({required int sampleRate, required int channelCount}) async { _audioContext = web.AudioContext(web.AudioContextOptions(sampleRate: sampleRate)); _scriptNode = _audioContext!.createScriptProcessor(2048, 0, channelCount); _scriptNode!.onaudioprocess = ((web.AudioProcessingEvent event) { final buffer = event.outputBuffer; final channelData = buffer.getChannelData(0); final int length = buffer.length; if (_bufferQueue.length < length) { _onFeed?.call(2048); } final Float32List dartList = channelData.toDart; for (int i = 0; i < length; i++) { if (_bufferQueue.isNotEmpty) { dartList[i] = _bufferQueue.removeAt(0); } else { dartList[i] = 0.0; } } }.toJS); } @override Future play() async { if (_audioContext?.state == 'suspended') { // AudioContext.resume returns a JS promise. // Wait, in dart package:web we might need to await it carefully or not await. _audioContext!.resume(); } _scriptNode?.connect(_audioContext!.destination); } @override Future pause() async { _scriptNode?.disconnect(); if (_audioContext?.state == 'running') { _audioContext!.suspend(); } } @override Future release() async { await pause(); _audioContext?.close(); } @override void setFeedCallback(void Function(int frames) onFeed) { _onFeed = onFeed; } @override Future feed(ArrayInt16 buffer) async { int numShorts = buffer.bytes.lengthInBytes ~/ 2; for (var i = 0; i < numShorts; i++) { int val = buffer.bytes.getInt16(i * 2, Endian.little); _bufferQueue.add(val / 32768.0); } } } ================================================ FILE: lib/src/services/chord_engine.dart ================================================ // ignore_for_file: constant_identifier_names /// Represents the 12 fundamental musical notes. enum Note { C('C'), CSharp('C#'), D('D'), DSharp('D#'), E('E'), F('F'), FSharp('F#'), G('G'), GSharp('G#'), A('A'), ASharp('A#'), B('B'); final String symbol; const Note(this.symbol); } /// Supported chord qualities. enum ChordType { major('Major'), minor('Minor'), dim('Diminished'), aug('Augmented'), sus2('sus2'), sus4('sus4'), maj6('Maj 6'), min6('Min 6'), dom7('Dom 7'), maj7('Maj 7'), min7('Min 7'), dim7('Dim 7'), halfDim7('Half-Dim 7'), minMaj7('Min-Maj 7'), dom7b5('Dom 7b5'), dom7S5('Dom 7#5'), maj7b5('Maj 7b5'), maj7S5('Maj 7#5'), add9('add9'), minAdd9('Min add9'), add11('add11'), minAdd11('Min add11'), dom9('Dom 9'), maj9('Maj 9'), min9('Min 9'), dom7b9('Dom 7b9'), dom7S9('Dom 7#9'), min9b5('Half-Dim 9'), dom11('Dom 11'), maj11('Maj 11'), min11('Min 11'), dom13('Dom 13'), maj13('Maj 13'), min13('Min 13'), dom7b13('Dom 7b13'), sus4_7('7sus4'), sus4_9('9sus4'), sixNine('6/9'), minSixNine('Min 6/9'), power('5'); final String label; const ChordType(this.label); } /// Wraps a raw integer (0-127) representing a MIDI note. extension type const MidiNote(int value) { PitchClass get pitchClass => PitchClass(value % 12); } /// Wraps a normalized integer (0-11) representing a pitch class. extension type const PitchClass(int value) { Note get note => Note.values[value]; /// Calculates the interval (in semitones) to another pitch class. int intervalTo(PitchClass other) => (other.value - value + 12) % 12; } /// A strongly-typed wrapper for interval patterns to use as Map keys. extension type const ChordPattern(String value) { /// Takes a list of intervals, sorts them, and formats them as a comparable string. factory ChordPattern.fromIntervals(List intervals) { final sorted = List.from(intervals)..sort(); return ChordPattern(sorted.toString()); } } /// The definition dictionary for supported chords based on intervals from the root. final Map chordDictionary = { // Triads ChordPattern('[0, 4, 7]'): ChordType.major, ChordPattern('[0, 3, 7]'): ChordType.minor, ChordPattern('[0, 3, 6]'): ChordType.dim, ChordPattern('[0, 4, 8]'): ChordType.aug, ChordPattern('[0, 2, 7]'): ChordType.sus2, ChordPattern('[0, 5, 7]'): ChordType.sus4, ChordPattern('[0, 7]'): ChordType.power, // 6th Chords ChordPattern('[0, 4, 7, 9]'): ChordType.maj6, ChordPattern('[0, 3, 7, 9]'): ChordType.min6, // 7th Chords ChordPattern('[0, 4, 7, 10]'): ChordType.dom7, ChordPattern('[0, 4, 7, 11]'): ChordType.maj7, ChordPattern('[0, 3, 7, 10]'): ChordType.min7, ChordPattern('[0, 3, 6, 9]'): ChordType.dim7, ChordPattern('[0, 3, 6, 10]'): ChordType.halfDim7, ChordPattern('[0, 3, 7, 11]'): ChordType.minMaj7, ChordPattern('[0, 4, 6, 10]'): ChordType.dom7b5, ChordPattern('[0, 4, 8, 10]'): ChordType.dom7S5, ChordPattern('[0, 4, 6, 11]'): ChordType.maj7b5, ChordPattern('[0, 4, 8, 11]'): ChordType.maj7S5, // 7th Rootless (No 5th) ChordPattern('[0, 4, 10]'): ChordType.dom7, ChordPattern('[0, 4, 11]'): ChordType.maj7, ChordPattern('[0, 3, 10]'): ChordType.min7, // Sus variants ChordPattern('[0, 5, 7, 10]'): ChordType.sus4_7, ChordPattern('[0, 2, 5, 7, 10]'): ChordType.sus4_9, // Added Notes ChordPattern('[0, 2, 4, 7]'): ChordType.add9, ChordPattern('[0, 2, 3, 7]'): ChordType.minAdd9, ChordPattern('[0, 4, 5, 7]'): ChordType.add11, ChordPattern('[0, 3, 5, 7]'): ChordType.minAdd11, // 9th Chords ChordPattern('[0, 2, 4, 7, 10]'): ChordType.dom9, ChordPattern('[0, 2, 4, 7, 11]'): ChordType.maj9, ChordPattern('[0, 2, 3, 7, 10]'): ChordType.min9, ChordPattern('[0, 1, 4, 7, 10]'): ChordType.dom7b9, ChordPattern('[0, 3, 4, 7, 10]'): ChordType.dom7S9, ChordPattern('[0, 2, 3, 6, 10]'): ChordType.min9b5, // 9th Rootless (No 5th) ChordPattern('[0, 2, 4, 10]'): ChordType.dom9, ChordPattern('[0, 2, 4, 11]'): ChordType.maj9, ChordPattern('[0, 2, 3, 10]'): ChordType.min9, ChordPattern('[0, 1, 4, 10]'): ChordType.dom7b9, ChordPattern('[0, 3, 4, 10]'): ChordType.dom7S9, // 11th Chords ChordPattern('[0, 2, 4, 5, 7, 10]'): ChordType.dom11, ChordPattern('[0, 2, 4, 5, 7, 11]'): ChordType.maj11, ChordPattern('[0, 2, 3, 5, 7, 10]'): ChordType.min11, // 13th Chords ChordPattern('[0, 2, 4, 5, 7, 9, 10]'): ChordType.dom13, ChordPattern('[0, 2, 4, 5, 7, 9, 11]'): ChordType.maj13, ChordPattern('[0, 2, 3, 5, 7, 9, 10]'): ChordType.min13, ChordPattern('[0, 4, 7, 8, 10]'): ChordType.dom7b13, // 13th Rootless (root, 3, 7, 13) ChordPattern('[0, 4, 9, 10]'): ChordType.dom13, ChordPattern('[0, 4, 9, 11]'): ChordType.maj13, ChordPattern('[0, 3, 9, 10]'): ChordType.min13, // 6/9 Chords ChordPattern('[0, 2, 4, 7, 9]'): ChordType.sixNine, ChordPattern('[0, 2, 3, 7, 9]'): ChordType.minSixNine, }; /// Evaluates a list of active MIDI notes and returns the recognized chord string. String identifyChord(List activeNotes) { if (activeNotes.isEmpty) return ''; // 1. Get unique pitch classes (deduplicate octaves) final uniquePitchClasses = activeNotes .map((n) => n.pitchClass.value) .toSet() .map((v) => PitchClass(v)) .toList(); // Single note played if (uniquePitchClasses.length == 1) { return uniquePitchClasses.first.note.symbol; } // 2. Identify bass note for slash chords / inversions final lowestNote = activeNotes.reduce((a, b) => a.value < b.value ? a : b); final bassPitchClass = lowestNote.pitchClass; // 3. Test each pitch class as the potential root for (final potentialRoot in uniquePitchClasses) { // Calculate intervals relative to this root final intervals = uniquePitchClasses.map((pc) => potentialRoot.intervalTo(pc)).toList(); // Create our typed pattern key final pattern = ChordPattern.fromIntervals(intervals); // 4. Check dictionary for a match if (chordDictionary.containsKey(pattern)) { final rootSymbol = potentialRoot.note.symbol; final typeLabel = chordDictionary[pattern]!.label; // Inversion / Slash chord formatting if (bassPitchClass.value != potentialRoot.value) { return '$rootSymbol $typeLabel / ${bassPitchClass.note.symbol}'; } return '$rootSymbol $typeLabel'; } } // If we have multiple notes but no dictionary match final sortedActiveNotes = List.from(activeNotes) ..sort((a, b) => a.value.compareTo(b.value)); final keysPressed = sortedActiveNotes .map((n) => n.pitchClass.note.symbol) .toSet() .join('-'); return keysPressed; } ================================================ FILE: lib/src/services/injection.config.dart ================================================ // GENERATED CODE - DO NOT MODIFY BY HAND // dart format width=80 // ************************************************************************** // InjectableConfigGenerator // ************************************************************************** // ignore_for_file: type=lint // coverage:ignore-file // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:get_it/get_it.dart' as _i174; import 'package:injectable/injectable.dart' as _i526; import 'package:shared_preferences/shared_preferences.dart' as _i460; import 'injection.dart' as _i464; import 'player.dart' as _i576; import 'settings.dart' as _i467; extension GetItInjectableX on _i174.GetIt { // initializes the registration of main-scope dependencies inside of GetIt Future<_i174.GetIt> init({ String? environment, _i526.EnvironmentFilter? environmentFilter, }) async { final gh = _i526.GetItHelper( this, environment, environmentFilter, ); final registerModule = _$RegisterModule(); await gh.factoryAsync<_i460.SharedPreferences>( () => registerModule.prefs, preResolve: true, ); gh.lazySingleton<_i576.PlayerService>(() => _i576.PlayerService()); gh.singleton<_i467.SettingsService>( () => _i467.SettingsService(gh<_i460.SharedPreferences>())); return this; } } class _$RegisterModule extends _i464.RegisterModule {} ================================================ FILE: lib/src/services/injection.dart ================================================ import 'package:get_it/get_it.dart'; import 'package:injectable/injectable.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'injection.config.dart'; final getIt = GetIt.instance; @InjectableInit( initializerName: 'init', preferRelativeImports: true, asExtension: true, ) Future configureDependencies() => getIt.init(); @module abstract class RegisterModule { @preResolve Future get prefs => SharedPreferences.getInstance(); } ================================================ FILE: lib/src/services/player.dart ================================================ import 'package:flutter/services.dart'; import 'package:injectable/injectable.dart'; import 'package:dart_melty_soundfont/synthesizer.dart'; import 'package:dart_melty_soundfont/synthesizer_settings.dart'; import 'package:dart_melty_soundfont/audio_renderer_ex.dart'; import 'package:dart_melty_soundfont/array_int16.dart'; import 'audio/pcm_audio_player.dart'; @lazySingleton class PlayerService { Synthesizer? _synth; late final PcmAudioPlayer _audioPlayer; bool _isInitialized = false; PlayerService() { _init(); } Future _init() async { _audioPlayer = PcmAudioPlayer(); await _audioPlayer.setup(sampleRate: 44100, channelCount: 1); _audioPlayer.setFeedCallback(_onFeed); ByteData bytes = await rootBundle.load('assets/sounds/Piano.sf2'); _synth = Synthesizer.loadByteData(bytes, SynthesizerSettings()); _isInitialized = true; } void _onFeed(int framesToRender) async { if (_synth == null) return; int frames = framesToRender > 0 ? framesToRender : 2048; ArrayInt16 buffer = ArrayInt16.zeros(numShorts: frames); _synth!.renderMonoInt16(buffer); await _audioPlayer.feed(buffer); } Future play(int midi, {bool sustain = false}) async { if (!_isInitialized || _synth == null) return; // Apply sustain CC if requested (Control change 64, data2 > 63 = on) _synth!.processMidiMessage(channel: 0, command: 0xB0, data1: 64, data2: sustain ? 127 : 0); _synth!.noteOn(channel: 0, key: midi, velocity: 100); // Fire and forget _audioPlayer.play(); } Future stop(int midi, {bool sustain = false}) async { if (!_isInitialized || _synth == null) return; _synth!.processMidiMessage(channel: 0, command: 0xB0, data1: 64, data2: sustain ? 127 : 0); _synth!.noteOff(channel: 0, key: midi); } Future stopSustain() async { if (!_isInitialized || _synth == null) return; _synth!.processMidiMessage(channel: 0, command: 0xB0, data1: 64, data2: 0); _synth!.noteOffAll(); } } ================================================ FILE: lib/src/services/settings.dart ================================================ import 'package:flutter/material.dart'; import 'package:injectable/injectable.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../models/settings_models.dart'; @singleton class SettingsService { final SharedPreferences _prefs; SettingsService(this._prefs) { _loadSettings(); } final disableScroll = ValueNotifier(false); final splitKeyboard = ValueNotifier(true); final themeColor = ValueNotifier(Colors.red); final themeMode = ValueNotifier(ThemeMode.light); final invertKeys = ValueNotifier(false); final keyWidth = ValueNotifier(80); final keyLabels = ValueNotifier(PitchLabels.both); final colorRole = ValueNotifier(ColorRole.monoChrome); final haptics = ValueNotifier(true); final locale = ValueNotifier(null); void _loadSettings() { disableScroll.value = _prefs.getBool('disableScroll') ?? false; splitKeyboard.value = _prefs.getBool('splitKeyboard') ?? true; final colorValue = _prefs.getInt('themeColor'); if (colorValue != null) themeColor.value = Color(colorValue); final modeName = _prefs.getString('themeMode'); if (modeName != null) { themeMode.value = ThemeMode.values.firstWhere( (e) => e.name == modeName, orElse: () => ThemeMode.light, ); } invertKeys.value = _prefs.getBool('invertKeys') ?? false; keyWidth.value = _prefs.getDouble('keyWidth') ?? 80; final labelsName = _prefs.getString('keyLabels'); if (labelsName != null) { keyLabels.value = PitchLabels.values.firstWhere( (e) => e.name == labelsName, orElse: () => PitchLabels.both, ); } final roleName = _prefs.getString('colorRole'); if (roleName != null) { colorRole.value = ColorRole.values.firstWhere( (e) => e.name == roleName, orElse: () => ColorRole.monoChrome, ); } haptics.value = _prefs.getBool('haptics') ?? true; final localeName = _prefs.getString('locale'); if (localeName != null) { locale.value = Locale(localeName); } _setupListeners(); } void _setupListeners() { disableScroll.addListener(() => _prefs.setBool('disableScroll', disableScroll.value)); splitKeyboard.addListener(() => _prefs.setBool('splitKeyboard', splitKeyboard.value)); themeColor.addListener(() => _prefs.setInt('themeColor', themeColor.value.toARGB32())); themeMode.addListener(() => _prefs.setString('themeMode', themeMode.value.name)); invertKeys.addListener(() => _prefs.setBool('invertKeys', invertKeys.value)); keyWidth.addListener(() => _prefs.setDouble('keyWidth', keyWidth.value)); keyLabels.addListener(() => _prefs.setString('keyLabels', keyLabels.value.name)); colorRole.addListener(() => _prefs.setString('colorRole', colorRole.value.name)); haptics.addListener(() => _prefs.setBool('haptics', haptics.value)); locale.addListener(() { if (locale.value != null) { _prefs.setString('locale', locale.value!.languageCode); } else { _prefs.remove('locale'); } }); } } ================================================ FILE: lib/src/version.dart ================================================ // Generated code. Do not modify. const packageVersion = '2.0.1+502'; ================================================ FILE: lib/ui/hooks/use_chord_recognition.dart ================================================ import 'package:flutter_hooks/flutter_hooks.dart'; import '../../src/services/chord_engine.dart'; class ChordState { final String chord; final void Function(int midi) onNoteOn; final void Function(int midi) onNoteOff; final void Function() clear; ChordState({ required this.chord, required this.onNoteOn, required this.onNoteOff, required this.clear, }); } ChordState useChordRecognition() { final activeNotes = useState>({}); void onNoteOn(int midi) { if (!activeNotes.value.contains(midi)) { activeNotes.value = {...activeNotes.value, midi}; } } void onNoteOff(int midi) { if (activeNotes.value.contains(midi)) { activeNotes.value = activeNotes.value.where((n) => n != midi).toSet(); } } void clear() { activeNotes.value = {}; } final chord = useMemoized(() { final midiNotes = activeNotes.value.map(MidiNote.new).toList(); return identifyChord(midiNotes); }, [activeNotes.value]); return ChordState( chord: chord, onNoteOn: onNoteOn, onNoteOff: onNoteOff, clear: clear, ); } ================================================ FILE: lib/ui/hooks/use_octave.dart ================================================ import 'package:flutter_hooks/flutter_hooks.dart'; class OctaveState { final int offset; final void Function(int) adjust; final void Function() reset; OctaveState({ required this.offset, required this.adjust, required this.reset, }); } OctaveState useOctave() { final offset = useState(0); const nOctaves = 7; void adjust(int adjustment) { offset.value = (offset.value + adjustment).clamp( -nOctaves + 2, nOctaves - 2, ); } void reset() { offset.value = 0; } return OctaveState( offset: offset.value, adjust: adjust, reset: reset, ); } ================================================ FILE: lib/ui/hooks/use_piano_keyboard.dart ================================================ import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'use_octave.dart'; import 'use_velocity.dart'; import 'use_sustain.dart'; import 'use_player.dart'; typedef PianoKeyHandler = KeyEventResult Function( FocusNode node, KeyEvent event); PianoKeyHandler usePianoKeyboard({ required OctaveState octave, required VelocityState velocity, required SustainState sustain, required PianoPlayer player, void Function(int midi)? onNoteOn, void Function(int midi)? onNoteOff, }) { final activeNotes = useRef>({}); final isSpaceHeld = useRef(false); final midiNotes = useMemoized(() => { LogicalKeyboardKey.keyA: 60 + (octave.offset * 12), LogicalKeyboardKey.keyW: 61 + (octave.offset * 12), LogicalKeyboardKey.keyS: 62 + (octave.offset * 12), LogicalKeyboardKey.keyE: 63 + (octave.offset * 12), LogicalKeyboardKey.keyD: 64 + (octave.offset * 12), LogicalKeyboardKey.keyF: 65 + (octave.offset * 12), LogicalKeyboardKey.keyT: 66 + (octave.offset * 12), LogicalKeyboardKey.keyG: 67 + (octave.offset * 12), LogicalKeyboardKey.keyY: 68 + (octave.offset * 12), LogicalKeyboardKey.keyH: 69 + (octave.offset * 12), LogicalKeyboardKey.keyU: 70 + (octave.offset * 12), LogicalKeyboardKey.keyJ: 71 + (octave.offset * 12), LogicalKeyboardKey.keyK: 72 + (octave.offset * 12), LogicalKeyboardKey.keyO: 73 + (octave.offset * 12), LogicalKeyboardKey.keyL: 74 + (octave.offset * 12), LogicalKeyboardKey.keyP: 75 + (octave.offset * 12), LogicalKeyboardKey.semicolon: 76 + (octave.offset * 12), LogicalKeyboardKey.quoteSingle: 77 + (octave.offset * 12), }, [octave.offset]); return useCallback((FocusNode node, KeyEvent event) { KeyEventResult result = KeyEventResult.ignored; final key = event.logicalKey; // final isCapsLockOn = HardwareKeyboard.instance.lockModesEnabled // .contains(KeyboardLockMode.capsLock); if (event is KeyDownEvent) { if (midiNotes.containsKey(key)) { final midi = midiNotes[key]!; if (!activeNotes.value.contains(midi)) { activeNotes.value.add(midi); onNoteOn?.call(midi); player.play(midi); } result = KeyEventResult.handled; } else if (key == LogicalKeyboardKey.keyZ) { octave.adjust(-1); result = KeyEventResult.handled; } else if (key == LogicalKeyboardKey.keyX) { octave.adjust(1); result = KeyEventResult.handled; } else if (key == LogicalKeyboardKey.keyC) { velocity.adjust(-1); result = KeyEventResult.handled; } else if (key == LogicalKeyboardKey.keyV) { velocity.adjust(1); result = KeyEventResult.handled; } else if (key == LogicalKeyboardKey.space) { isSpaceHeld.value = true; sustain.setSustain(true); result = KeyEventResult.handled; } } else if (event is KeyUpEvent) { if (midiNotes.containsKey(key)) { final midi = midiNotes[key]!; if (activeNotes.value.contains(midi)) { activeNotes.value.remove(midi); onNoteOff?.call(midi); player.stop(midi); } result = KeyEventResult.handled; } else if (key == LogicalKeyboardKey.space) { isSpaceHeld.value = false; sustain.setSustain(false); result = KeyEventResult.handled; } } // // Sync sustain with Caps Lock state on any key event // if (key == LogicalKeyboardKey.capsLock) { // sustain.setSustain(isCapsLockOn || isSpaceHeld.value); // } return result; }, [octave, velocity, sustain, player, onNoteOn, onNoteOff]); } ================================================ FILE: lib/ui/hooks/use_player.dart ================================================ import '../../src/services/player.dart'; import '../../src/services/injection.dart'; class PianoPlayer { final PlayerService service; final bool globalSustain; PianoPlayer({required this.service, required this.globalSustain}); Future play(int midi) async { await service.play(midi, sustain: globalSustain); } Future stop(int midi) async { await service.stop(midi, sustain: globalSustain); } } PianoPlayer usePlayer({required bool sustain}) { final player = getIt(); return PianoPlayer(service: player, globalSustain: sustain); } ================================================ FILE: lib/ui/hooks/use_sustain.dart ================================================ import 'package:flutter_hooks/flutter_hooks.dart'; import '../../src/services/player.dart'; import '../../src/services/injection.dart'; class SustainState { final bool value; final void Function(bool) setSustain; SustainState({ required this.value, required this.setSustain, }); } SustainState useSustain() { final sustain = useState(false); final player = getIt(); void setSustain(bool val) { sustain.value = val; if (!val) { player.stopSustain(); } } return SustainState( value: sustain.value, setSustain: setSustain, ); } ================================================ FILE: lib/ui/hooks/use_velocity.dart ================================================ import 'package:flutter_hooks/flutter_hooks.dart'; class VelocityState { final int value; final void Function(int) adjust; VelocityState({ required this.value, required this.adjust, }); } VelocityState useVelocity() { final velocity = useState(127); void adjust(int adjustment) { velocity.value = (velocity.value + adjustment).clamp(0, 127); } return VelocityState( value: velocity.value, adjust: adjust, ); } ================================================ FILE: lib/ui/router.dart ================================================ import 'package:go_router/go_router.dart'; import 'screens/home.dart'; import 'screens/settings.dart'; import '../src/services/injection.dart'; import '../src/services/settings.dart'; final router = GoRouter( initialLocation: '/', routes: [ GoRoute( path: '/', builder: (context, state) => const Home(), ), GoRoute( path: '/settings', builder: (context, state) => SettingsScreen(settings: getIt()), ), ], ); ================================================ FILE: lib/ui/screens/app.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_piano/l10n/app_localizations.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:shadcn_ui/shadcn_ui.dart'; import '../../src/services/settings.dart'; import '../../src/services/injection.dart'; import '../router.dart'; class ThePocketPiano extends HookWidget { const ThePocketPiano({super.key}); @override Widget build(BuildContext context) { final settings = getIt(); final color = useListenableSelector( settings.themeColor, () => settings.themeColor.value); final mode = useListenableSelector( settings.themeMode, () => settings.themeMode.value); final locale = useListenableSelector(settings.locale, () => settings.locale.value); return ShadApp.router( debugShowCheckedModeBanner: false, title: 'The Pocket Piano', theme: ShadThemeData( brightness: Brightness.light, colorScheme: ShadZincColorScheme.light( primary: color, ), ), darkTheme: ShadThemeData( brightness: Brightness.dark, colorScheme: ShadZincColorScheme.dark( primary: color, ), ), themeMode: mode, locale: locale, localizationsDelegates: [ ...AppLocalizations.localizationsDelegates, GlobalShadLocalizations.delegate, ], supportedLocales: AppLocalizations.supportedLocales, routerConfig: router, ); } } ================================================ FILE: lib/ui/screens/home.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:go_router/go_router.dart'; import 'package:shadcn_ui/shadcn_ui.dart'; import '../../src/services/settings.dart'; import '../../src/services/injection.dart'; import '../widgets/locale.dart'; import '../widgets/piano_view.dart'; import '../hooks/use_octave.dart'; import '../hooks/use_velocity.dart'; import '../hooks/use_sustain.dart'; import '../hooks/use_player.dart'; import '../hooks/use_piano_keyboard.dart'; import '../hooks/use_chord_recognition.dart'; class Home extends HookWidget { const Home({super.key}); @override Widget build(BuildContext context) { final settingsService = getIt(); final splitKeyboard = useListenableSelector( settingsService.splitKeyboard, () => settingsService.splitKeyboard.value, ); final focusNode = useFocusNode(); final octave = useOctave(); final velocity = useVelocity(); final sustain = useSustain(); final player = usePlayer(sustain: sustain.value); final chord = useChordRecognition(); final onKeyEvent = usePianoKeyboard( octave: octave, velocity: velocity, sustain: sustain, player: player, onNoteOn: chord.onNoteOn, onNoteOff: chord.onNoteOff, ); const nOctaves = 7; final onPlay = useCallback((int midi) { if (!focusNode.hasFocus) { focusNode.requestFocus(); } chord.onNoteOn(midi); player.play(midi); }, [chord, player, focusNode]); final onStop = useCallback((int midi) { chord.onNoteOff(midi); player.stop(midi); }, [chord, player]); final shadTheme = ShadTheme.of(context); return LayoutBuilder(builder: (context, dimens) { final canSplit = dimens.maxHeight > 600; final showControls = dimens.maxWidth > 550; final isLandscape = dimens.maxWidth > dimens.maxHeight || dimens.minWidth > 500; return Focus( focusNode: focusNode, autofocus: true, onKeyEvent: onKeyEvent, child: Scaffold( appBar: AppBar( title: Row( children: [ Text(context.locale.title), if (isLandscape && chord.chord.isNotEmpty) ...[ const SizedBox(width: 12), Container( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), decoration: BoxDecoration( color: shadTheme.colorScheme.accent, borderRadius: BorderRadius.circular(4), ), child: Text( chord.chord, style: shadTheme.textTheme.small.copyWith( color: shadTheme.colorScheme.accentForeground, fontWeight: FontWeight.bold, ), ), ), ], ], ), actions: [ if (showControls) ...[ ShadIconButton( onPressed: () => octave.adjust(-1), icon: const Icon(LucideIcons.minus), ), const SizedBox(width: 4), ShadIconButton.outline( onPressed: octave.reset, icon: Text( octave.offset.toString(), ), ), const SizedBox(width: 4), ShadIconButton( onPressed: () => octave.adjust(1), icon: const Icon(LucideIcons.plus), ), const SizedBox(width: 10), ], Text('${context.locale.sustain}:'), ShadSwitch( value: sustain.value, onChanged: sustain.setSustain, ), if (canSplit) ...[ ShadIconButton.ghost( onPressed: () async { settingsService.splitKeyboard.value = !splitKeyboard; }, icon: Icon(!splitKeyboard ? LucideIcons.layoutPanelTop : LucideIcons.maximize), ), ], ShadIconButton.ghost( onPressed: () => context.push('/settings'), icon: const Icon(LucideIcons.settings), ), ], ), backgroundColor: ShadTheme.of(context).colorScheme.background, body: Column( children: [ Expanded( child: Builder(builder: (context) { if (canSplit && splitKeyboard) { return Column( children: [ Flexible( child: PianoView( octaves: nOctaves, onPlay: onPlay, onStop: onStop, settings: settingsService, ), ), Flexible( child: PianoView( octaves: nOctaves, onPlay: onPlay, onStop: onStop, settings: settingsService, ), ), ], ); } return PianoView( octaves: nOctaves, onPlay: onPlay, onStop: onStop, settings: settingsService, ); }), ), ], ), ), ); }); } } ================================================ FILE: lib/ui/screens/settings.dart ================================================ import 'package:country_flags/country_flags.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_piano/l10n/app_localizations.dart'; import 'package:go_router/go_router.dart'; import 'package:recase/recase.dart'; import 'package:shadcn_ui/shadcn_ui.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../src/services/settings.dart'; import '../../src/models/settings_models.dart'; import '../../src/version.dart'; import '../widgets/color_picker.dart'; import '../widgets/locale.dart'; class SettingsScreen extends HookWidget { const SettingsScreen({super.key, required this.settings}); final SettingsService settings; @override Widget build(BuildContext context) { final themeMode = useListenableSelector( settings.themeMode, () => settings.themeMode.value); final themeColor = useListenableSelector( settings.themeColor, () => settings.themeColor.value); final keyWidth = useListenableSelector(settings.keyWidth, () => settings.keyWidth.value); final invertKeys = useListenableSelector( settings.invertKeys, () => settings.invertKeys.value); final keyLabel = useListenableSelector( settings.keyLabels, () => settings.keyLabels.value); final haptics = useListenableSelector(settings.haptics, () => settings.haptics.value); final disableScroll = useListenableSelector( settings.disableScroll, () => settings.disableScroll.value); final currentLocale = useListenableSelector(settings.locale, () => settings.locale.value); final shadTheme = ShadTheme.of(context); return Scaffold( backgroundColor: shadTheme.colorScheme.background, appBar: AppBar( backgroundColor: shadTheme.colorScheme.background, elevation: 0, leading: ShadButton.ghost( child: const Icon(LucideIcons.arrowLeft), onPressed: () => context.pop(), ), title: Text( context.locale.settings, style: shadTheme.textTheme.h4, ), ), body: SingleChildScrollView( padding: const EdgeInsets.all(16.0), child: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ // Theme Section _SectionHeader(title: context.locale.themeBrightness), _ThemeItem( label: context.locale.themeBrightnessSystem, icon: LucideIcons.sunMoon, isSelected: themeMode == ThemeMode.system, onPressed: () => settings.themeMode.value = ThemeMode.system, ), _ThemeItem( label: context.locale.themeBrightnessLight, icon: LucideIcons.sun, isSelected: themeMode == ThemeMode.light, onPressed: () => settings.themeMode.value = ThemeMode.light, ), _ThemeItem( label: context.locale.themeBrightnessDark, icon: LucideIcons.moon, isSelected: themeMode == ThemeMode.dark, onPressed: () => settings.themeMode.value = ThemeMode.dark, ), const SizedBox(height: 24), // Color Section _SectionHeader(title: context.locale.themeColor), ColorPicker( color: themeColor, onColorChanged: (value) => settings.themeColor.value = value, label: context.locale.themeColor, ), const SizedBox(height: 24), // Keyboard Section _SectionHeader(title: context.locale.keySettings), Text(context.locale.keyWidth, style: shadTheme.textTheme.muted), const SizedBox(height: 8), ShadSlider( initialValue: keyWidth, min: 50, max: 200, onChanged: (value) => settings.keyWidth.value = value, ), const SizedBox(height: 8), _SettingRow( label: context.locale.invertKeys, child: ShadSwitch( value: invertKeys, onChanged: (value) => settings.invertKeys.value = value, ), ), const SizedBox(height: 24), // Advanced Section _SectionHeader(title: "Advanced"), _SettingRow( label: context.locale.keyLabels, child: ShadSelect( initialValue: keyLabel, onChanged: (value) { if (value != null) settings.keyLabels.value = value; }, options: [ for (final item in PitchLabels.values) ShadOption( value: item, child: Text(item.name.titleCase), ), ], selectedOptionBuilder: (context, value) => Text(value.name.titleCase), ), ), const SizedBox(height: 8), _SettingRow( label: context.locale.hapticFeedback, child: ShadSwitch( value: haptics, onChanged: (value) => settings.haptics.value = value, ), ), const SizedBox(height: 8), _SettingRow( label: context.locale.disableScroll, child: ShadSwitch( value: disableScroll, onChanged: (value) => settings.disableScroll.value = value, ), ), const SizedBox(height: 24), // Language Section _SectionHeader(title: context.locale.language), Wrap( spacing: 8, runSpacing: 8, children: [ for (final locale in AppLocalizations.supportedLocales) ShadButton.outline( onPressed: currentLocale?.languageCode == locale.languageCode ? null : () => settings.locale.value = locale, child: Row( mainAxisSize: MainAxisSize.min, children: [ locale.flag, const SizedBox(width: 8), Text(locale.description(context)), ], ), ), ], ), if (currentLocale != null) ...[ const SizedBox(height: 12), ShadButton.ghost( onPressed: () => settings.locale.value = null, child: Text(context.locale.resetToDefault), ), ], const SizedBox(height: 32), // About Section (Premium Design) Container( padding: const EdgeInsets.all(24), decoration: BoxDecoration( borderRadius: BorderRadius.circular(24), color: shadTheme.colorScheme.muted.withValues(alpha: 0.1), ), child: Column( children: [ Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(24), boxShadow: [ BoxShadow( color: shadTheme.colorScheme.foreground .withValues(alpha: 0.1), blurRadius: 12, offset: const Offset(0, 4), ), ], ), child: ClipRRect( borderRadius: BorderRadius.circular(24), child: Image.asset( 'web/icons/Icon-192.png', width: 96, height: 96, ), ), ), const SizedBox(height: 16), Text( context.locale.title, style: shadTheme.textTheme.h3, ), const SizedBox(height: 4), Text( '${context.locale.version} $packageVersion', style: shadTheme.textTheme.muted, ), if (!kIsWeb && !kIsWasm) ...[ const SizedBox(height: 24), ShadButton.secondary( onPressed: () async { final url = Uri.parse('https://pocketpiano.app'); if (await canLaunchUrl(url)) { await launchUrl(url); } }, child: Text(context.locale.webVersion), ), ], const SizedBox(height: 12), ShadButton.outline( onPressed: () { showLicensePage( context: context, applicationName: context.locale.title, applicationVersion: packageVersion, ); }, child: Text(context.locale.showLicenses), ), ], ), ), ], ), ), ), ); } } class _SectionHeader extends StatelessWidget { const _SectionHeader({required this.title}); final String title; @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.only(bottom: 8.0), child: Text( title, style: ShadTheme.of(context) .textTheme .large .copyWith(fontWeight: FontWeight.bold), ), ); } } class _ThemeItem extends StatelessWidget { final String label; final IconData icon; final bool isSelected; final VoidCallback onPressed; const _ThemeItem({ required this.label, required this.icon, required this.isSelected, required this.onPressed, }); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.only(bottom: 8.0), child: ShadButton.outline( onPressed: onPressed, mainAxisAlignment: MainAxisAlignment.start, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( mainAxisSize: MainAxisSize.min, children: [ Icon(icon, size: 16), const SizedBox(width: 12), Text(label), ], ), if (isSelected) const Icon(LucideIcons.check, size: 16), ], ), ), ); } } class _SettingRow extends StatelessWidget { const _SettingRow({required this.label, required this.child}); final String label; final Widget child; @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(vertical: 4.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(label), child, ], ), ); } } extension on Locale { String description(BuildContext context) { switch (languageCode) { case 'en': return context.locale.languageEn; case 'es': return context.locale.languageEs; case 'de': return context.locale.languageDe; case 'fr': return context.locale.languageFr; case 'ja': return context.locale.languageJa; case 'ko': return context.locale.languageKo; case 'zh': return context.locale.languageZh; case 'ru': return context.locale.languageRu; default: } return 'Unknown'; } Widget get flag { String? code; switch (languageCode) { case 'ja': code = 'jp'; case 'en': code = 'us'; case 'ko': code = 'kr'; case 'zh': code = 'cn'; case 'ru': code = 'ru'; default: } if (code != null) { return CountryFlag.fromCountryCode( code, height: 16, width: 24, shape: const RoundedRectangle(2), ); } return CountryFlag.fromLanguageCode( languageCode.toUpperCase(), height: 16, width: 24, shape: const RoundedRectangle(2), ); } } ================================================ FILE: lib/ui/widgets/color_picker.dart ================================================ import 'package:flutter/material.dart'; import 'package:shadcn_ui/shadcn_ui.dart'; class ColorPicker extends StatelessWidget { const ColorPicker({ super.key, required this.color, required this.onColorChanged, required this.label, }); final Color color; final ValueChanged onColorChanged; final String label; @override Widget build(BuildContext context) { const themeColors = [ Colors.red, Colors.pink, Colors.purple, Colors.deepPurple, Colors.indigo, Colors.blue, Colors.lightBlue, Colors.cyan, Colors.teal, Colors.green, Colors.lightGreen, Colors.lime, Colors.yellow, Colors.amber, Colors.orange, Colors.deepOrange, Colors.brown, Colors.grey, Colors.blueGrey, ]; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only(bottom: 8.0), child: Text( label, style: ShadTheme.of(context).textTheme.muted, ), ), Wrap( spacing: 8, runSpacing: 8, children: themeColors.map((item) { final isSelected = item.toARGB32() == color.toARGB32(); return GestureDetector( onTap: () => onColorChanged(item), child: Container( width: 32, height: 32, decoration: BoxDecoration( color: item, shape: BoxShape.circle, border: Border.all( color: isSelected ? ShadTheme.of(context).colorScheme.ring : ShadTheme.of(context) .colorScheme .muted .withValues(alpha: 0.6), width: 2, ), ), child: isPressed(item, isSelected, context), ), ); }).toList(), ), ], ); } Widget? isPressed(Color item, bool isSelected, BuildContext context) { if (!isSelected) return null; return Icon( LucideIcons.check, size: 16, color: item.computeLuminance() > 0.5 ? Colors.black : Colors.white, ); } } ================================================ FILE: lib/ui/widgets/color_role.dart ================================================ export '../../src/models/settings_models.dart'; ================================================ FILE: lib/ui/widgets/locale.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_piano/l10n/app_localizations.dart'; extension LangUtils on BuildContext { AppLocalizations get locale => AppLocalizations.of(this)!; } ================================================ FILE: lib/ui/widgets/piano_key.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:shadcn_ui/shadcn_ui.dart'; import '../../src/services/settings.dart'; import '../../src/models/settings_models.dart'; class PianoKey extends HookWidget { const PianoKey({ super.key, required this.accidental, required this.midi, required this.onPlay, this.onStop, required this.settings, }); final bool accidental; final int midi; final VoidCallback onPlay; final VoidCallback? onStop; final SettingsService settings; static const BorderRadius borderRadius = BorderRadius.only( bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8), ); @override Widget build(BuildContext context) { final labels = useListenableSelector( settings.keyLabels, () => settings.keyLabels.value); final keyWidth = useListenableSelector(settings.keyWidth, () => settings.keyWidth.value); final invertKeys = useListenableSelector( settings.invertKeys, () => settings.invertKeys.value); final haptics = useListenableSelector(settings.haptics, () => settings.haptics.value); final isPressed = useState(false); final pitchName = midi.pitchName(labels); final shadTheme = ShadTheme.of(context); final shadColors = shadTheme.colorScheme; Color black = shadColors.foreground; Color white = shadColors.background; if (invertKeys) { final tmp = black; black = white; white = tmp; } final bgColor = accidental ? black : white; final fgColor = !accidental ? black : white; return GestureDetector( onTapDown: (_) { onPlay(); isPressed.value = true; if (haptics) { HapticFeedback.mediumImpact(); } }, onTapUp: (_) { isPressed.value = false; onStop?.call(); }, onTapCancel: () { isPressed.value = false; onStop?.call(); }, child: AnimatedContainer( duration: const Duration(milliseconds: 100), width: keyWidth, margin: const EdgeInsets.symmetric(horizontal: 1.0), decoration: BoxDecoration( color: isPressed.value ? (accidental ? bgColor.withValues(alpha: 0.8) : Color.lerp(bgColor, fgColor, 0.1)) : bgColor, borderRadius: borderRadius, border: Border.all( color: shadColors.border, width: accidental ? 0 : 0.5, ), boxShadow: [ if (!isPressed.value) BoxShadow( color: Colors.black.withValues(alpha: 0.1), blurRadius: 2, offset: const Offset(0, 2), ), ], ), child: Stack( children: [ Semantics( button: true, hint: pitchName, child: const SizedBox.expand(), ), Positioned( left: 0.0, right: 0.0, bottom: 12.0, child: pitchName.isNotEmpty ? Text( pitchName.split('/').join('\n'), textAlign: TextAlign.center, style: shadTheme.textTheme.small.copyWith( color: fgColor, fontWeight: FontWeight.bold, ), ) : const SizedBox.shrink(), ), ], ), ), ); } } ================================================ FILE: lib/ui/widgets/piano_section.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import '../../src/services/settings.dart'; import 'piano_key.dart'; class PianoSection extends HookWidget { const PianoSection({ super.key, required this.index, required this.onPlay, this.onStop, required this.settings, }); final int index; final ValueChanged onPlay; final ValueChanged? onStop; final SettingsService settings; @override Widget build(BuildContext context) { final keyWidth = useListenableSelector(settings.keyWidth, () => settings.keyWidth.value); final int i = index * 12; return SafeArea( child: Stack( children: [ Row(mainAxisSize: MainAxisSize.min, children: [ _buildKey(24 + i, false), _buildKey(26 + i, false), _buildKey(28 + i, false), _buildKey(29 + i, false), _buildKey(31 + i, false), _buildKey(33 + i, false), _buildKey(35 + i, false), ]), Positioned( top: 0, left: 0, right: 0, bottom: 100, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.min, children: [ Container(width: keyWidth * .5), _buildKey(25 + i, true), _buildKey(27 + i, true), Container(width: keyWidth), _buildKey(30 + i, true), _buildKey(32 + i, true), _buildKey(34 + i, true), Container(width: keyWidth * .5), ], ), ), ], ), ); } Widget _buildKey(int midi, bool accidental) { return PianoKey( settings: settings, midi: midi, accidental: accidental, onPlay: () => onPlay(midi), onStop: onStop != null ? () => onStop!(midi) : null, ); } } ================================================ FILE: lib/ui/widgets/piano_slider.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:shadcn_ui/shadcn_ui.dart'; import '../../src/services/settings.dart'; class PianoSlider extends HookWidget { const PianoSlider({ super.key, required this.viewport, required this.offset, required this.offsetChanged, required this.settings, }); final double offset; final double viewport; final ValueChanged offsetChanged; final SettingsService settings; @override Widget build(BuildContext context) { final shadTheme = ShadTheme.of(context); final shadColors = shadTheme.colorScheme; final invertKeys = useListenableSelector(settings.invertKeys, () => settings.invertKeys.value); Color black = shadColors.foreground; Color white = shadColors.background; if (invertKeys) { final tmp = black; black = white; white = tmp; } return LayoutBuilder(builder: (context, dimens) { final viewWidth = dimens.maxWidth; final sectionWidth = viewport; final totalWidth = sectionWidth * 7; final relativeOffset = offset / totalWidth * viewWidth; final relativeViewWidth = viewWidth / totalWidth * viewWidth; return Container( color: shadColors.muted, padding: const EdgeInsets.only(bottom: 4.0), child: GestureDetector( onHorizontalDragUpdate: (details) { final localX = details.localPosition.dx; final newOffset = (localX / viewWidth * totalWidth).clamp(0.0, totalWidth - viewport); offsetChanged(newOffset); }, child: Stack( children: [ Positioned.fill( child: Row( children: [ for (int i = 0; i < 7; i++) _buildSection(context, i, black, white), ], ), ), Positioned( top: 0, bottom: 0, left: 0, width: relativeOffset, child: Container( color: shadColors.muted.withValues(alpha: 0.6), ), ), Positioned( top: 0, bottom: 0, left: relativeOffset + relativeViewWidth, right: 0, child: Container( color: shadColors.muted.withValues(alpha: 0.6), ), ), Positioned( left: relativeOffset, width: relativeViewWidth, top: 0, bottom: 0, child: Container( decoration: BoxDecoration( border: Border.all( color: shadColors.primary, width: 2, ), ), ), ), ], ), ), ); }); } Widget _buildSection( BuildContext context, int octave, Color black, Color white, ) { return Expanded( child: Stack( children: [ Row( children: [ for (int i = 0; i < 7; i++) _buildKey(context, false, black, white), ], ), Positioned.fill( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const Spacer(flex: 1), _buildKey(context, true, black, white), _buildKey(context, true, black, white), const Spacer(flex: 2), _buildKey(context, true, black, white), _buildKey(context, true, black, white), _buildKey(context, true, black, white), const Spacer(flex: 1), ], ), ), ], ), ); } Widget _buildKey( BuildContext context, bool accidental, Color black, Color white, ) { return Expanded( flex: accidental ? 2 : 1, child: Container( margin: const EdgeInsets.symmetric(horizontal: 0.5), decoration: BoxDecoration( borderRadius: const BorderRadius.only( bottomLeft: Radius.circular(2), bottomRight: Radius.circular(2), ), color: accidental ? black : white, ), ), ); } } ================================================ FILE: lib/ui/widgets/piano_view.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import '../../src/services/settings.dart'; import 'piano_section.dart'; import 'piano_slider.dart'; class PianoView extends HookWidget { const PianoView({ super.key, required this.octaves, required this.onPlay, this.onStop, required this.settings, }); final int octaves; final ValueChanged onPlay; final ValueChanged? onStop; final SettingsService settings; @override Widget build(BuildContext context) { final controller = useScrollController(); final currentOffset = useState(0.0); final keyWidthValue = useListenableSelector(settings.keyWidth, () => settings.keyWidth.value); final disableScroll = useListenableSelector(settings.disableScroll, () => settings.disableScroll.value); final keyWidth = keyWidthValue + 4; final sectionSize = keyWidth * 7; useEffect(() { void listener() { currentOffset.value = controller.offset; } controller.addListener(listener); WidgetsBinding.instance.addPostFrameCallback((_) { final middleC4Offset = ((keyWidth * 7) * 3) - (keyWidth * 3.5); currentOffset.value = middleC4Offset; if (controller.hasClients) { controller.jumpTo(middleC4Offset); } }); return () => controller.removeListener(listener); }, [keyWidth]); final physics = disableScroll ? const NeverScrollableScrollPhysics() : const BouncingScrollPhysics(); return Column( children: [ ConstrainedBox( constraints: const BoxConstraints( maxHeight: 50, ), child: PianoSlider( settings: settings, viewport: sectionSize, offset: currentOffset.value, offsetChanged: (value) { controller.jumpTo(value); currentOffset.value = value; }, ), ), Expanded( flex: 1, child: ListView.builder( physics: physics, itemCount: octaves, controller: controller, scrollDirection: Axis.horizontal, itemBuilder: (context, index) { return PianoSection( index: index, onPlay: onPlay, onStop: onStop, settings: settings, ); }, ), ), ], ); } } ================================================ FILE: main.yml ================================================ name: Build and Deploy Website on: pull_request: branches: - master push: branches: - master jobs: build_web: name: Build Flutter Project (Web) runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: '12.x' - uses: subosito/flutter-action@v1 with: channel: 'dev' - run: flutter pub get - run: flutter config --enable-web - run: flutter build web - name: Upload Web Folder uses: actions/upload-artifact@master with: name: web-build path: build/web build_ios: name: Build Flutter Project (iOS) runs-on: macOS-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: '12.x' - uses: subosito/flutter-action@v1 with: channel: 'dev' - run: flutter pub get - run: flutter build ios - name: Upload iPA uses: actions/upload-artifact@master with: name: ios-build path: build/ios/iphoneos/Runner.app build_android: name: Build Flutter Project (Android) runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: '12.x' - uses: subosito/flutter-action@v1 with: channel: 'dev' - run: flutter pub get - run: flutter build apk --target-platform android-arm,android-arm64 --split-per-abi # - run: appbundle --target-platform android-arm,android-arm64 - name: Upload APKs uses: actions/upload-artifact@master with: name: apk-build path: build/app/outputs/apk/release deploy_web: name: Deploy Website to Firebase Hosting needs: build_web runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@master - name: Download Artifact uses: actions/download-artifact@master with: name: web-build - name: Deploy to Firebase uses: w9jds/firebase-action@master with: args: deploy --only hosting --public web-build env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} PROJECT_ID: default # name: Build and Deploy iOS # on: push # jobs: # build: # name: Build # runs-on: macOS-latest # steps: # - uses: actions/checkout@v1 # - uses: actions/setup-java@v1 # with: # java-version: '12.x' # - uses: subosito/flutter-action@v1 # with: # channel: 'dev' # - run: flutter pub get # - run: flutter test # - run: flutter build ios # - name: Upload iPA # uses: ncipollo/release-action@v1 # with: # commit: master # tag: v1 # artifacts: "build/ios/iphoneos/Runner.app" # token: ${{ secrets.GITHUB_TOKEN }} # name: Build and Deploy Android # on: push # jobs: # build: # name: Build # strategy: # matrix: # os: # # - macOS-latest # # - windows-latest # # - ubuntu-latest # runs-on: ${{matrix.os}} # runs-on: ubuntu-latest # steps: # - uses: actions/checkout@v1 # - uses: actions/setup-java@v1 # with: # java-version: '12.x' # - uses: subosito/flutter-action@v1 # with: # channel: 'dev' # - run: flutter pub get # - run: flutter test # - run: flutter build apk --debug --split-per-abi # - name: Upload APKs # uses: ncipollo/release-action@v1 # with: # commit: master # tag: v1 # artifacts: "build/app/outputs/apk/debug/*.apk" # token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: pubspec.yaml ================================================ name: flutter_piano description: A Cross platform Midi Piano built with Flutter. maintainer: Rody Davis Jr homepage: https://github.com/rodydavis/flutter_piano version: 2.0.1+502 publish_to: none environment: sdk: ">=3.3.0 <4.0.0" dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter flutter_hooks: ^0.21.2 get_it: ^8.0.2 injectable: ^2.5.0 go_router: ^14.7.2 recase: ^4.1.0 shared_preferences: ^2.3.2 intl: any country_flags: ^3.0.0 shadcn_ui: ^0.53.5 url_launcher: ^6.3.1 dart_melty_soundfont: ^2.0.0 flutter_pcm_sound: ^3.3.3 web: ^1.1.1 shelf_router: ^1.1.4 shelf: ^1.4.2 path: ^1.9.1 markdown: ^7.3.1 mustache_template: ^2.0.4 shelf_static: ^1.1.3 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^5.0.0 build_version: ^2.1.1 build_runner: ^2.4.9 injectable_generator: ^2.6.2 msix: ^3.16.1 mocktail: ^1.0.4 flutter_hooks_test: ^2.0.0 dependency_overrides: package_info_plus: ^4.0.0 flutter: generate: true uses-material-design: true assets: - assets/sounds/Piano.sf2 - CHANGELOG.md - web/icons/Icon-192.png ================================================ FILE: templates/base.mustache ================================================ {{title}} - The Pocket Piano {{{content}}} ================================================ FILE: templates/markdown.mustache ================================================

The Pocket Piano

{{{markdownHtml}}}
================================================ FILE: templates/marketing.mustache ================================================

The Pocket Piano

Piano in your pocket with support for hardware keyboard playback and sustain.

Access anywhere, anytime

Works across iOS, Android, and Web. Play any note on a piano, always in your pocket.

================================================ FILE: test/home_test.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_piano/src/services/player.dart'; import 'package:flutter_piano/src/services/settings.dart'; import 'package:flutter_piano/src/services/injection.dart'; import 'package:flutter_piano/ui/screens/app.dart'; import 'package:flutter_piano/ui/widgets/piano_view.dart'; import 'package:flutter_piano/src/version.dart'; import 'package:mocktail/mocktail.dart'; import 'package:shared_preferences/shared_preferences.dart'; class MockPlayerService extends Mock implements PlayerService {} class MockSharedPreferences extends Mock implements SharedPreferences {} void main() { late MockPlayerService mockPlayerService; late SettingsService settingsService; late MockSharedPreferences mockSharedPreferences; setUp(() async { mockPlayerService = MockPlayerService(); mockSharedPreferences = MockSharedPreferences(); // Stub SharedPreferences when(() => mockSharedPreferences.getBool(any())).thenReturn(null); when(() => mockSharedPreferences.getInt(any())).thenReturn(null); when(() => mockSharedPreferences.getDouble(any())).thenReturn(null); when(() => mockSharedPreferences.getString(any())).thenReturn(packageVersion); when(() => mockSharedPreferences.setBool(any(), any())).thenAnswer((_) async => true); when(() => mockSharedPreferences.setInt(any(), any())).thenAnswer((_) async => true); when(() => mockSharedPreferences.setDouble(any(), any())).thenAnswer((_) async => true); when(() => mockSharedPreferences.setString(any(), any())).thenAnswer((_) async => true); settingsService = SettingsService(mockSharedPreferences); getIt.reset(); getIt.registerSingleton(mockPlayerService); getIt.registerSingleton(settingsService); getIt.registerSingleton(mockSharedPreferences); }); testWidgets('renders App correctly', (WidgetTester tester) async { await tester.binding.setSurfaceSize(const Size(1024, 768)); await tester.pumpWidget(const ThePocketPiano()); // Wait for GoRouter to initialize and navigate for(int i = 0; i < 5; i++) { await tester.pump(const Duration(milliseconds: 100)); } await tester.pumpAndSettle(); expect(find.byType(ThePocketPiano), findsOneWidget); // Use predicate to avoid type mismatch issues just in case expect(find.byWidgetPredicate((w) => w.runtimeType.toString() == 'Home'), findsOneWidget); expect(find.byType(Scaffold), findsOneWidget); expect(find.byType(PianoView), findsWidgets); }); } ================================================ FILE: test/src/services/chord_engine_test.dart ================================================ import 'package:flutter_piano/src/services/chord_engine.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group('identifyChord', () { test('returns empty string for empty list', () { expect(identifyChord([]), ''); }); test('identifies single notes', () { expect(identifyChord([const MidiNote(60)]), 'C'); // Middle C expect(identifyChord([const MidiNote(61)]), 'C#'); expect(identifyChord([const MidiNote(72)]), 'C'); // C5 }); test('identifies major triads', () { // C Major (C, E, G) expect(identifyChord([const MidiNote(60), const MidiNote(64), const MidiNote(67)]), 'C Major'); // G Major (G, B, D) expect(identifyChord([const MidiNote(67), const MidiNote(71), const MidiNote(74)]), 'G Major'); }); test('identifies minor triads', () { // C Minor (C, Eb, G) expect(identifyChord([const MidiNote(60), const MidiNote(63), const MidiNote(67)]), 'C Minor'); // A Minor (A, C, E) expect(identifyChord([const MidiNote(57), const MidiNote(60), const MidiNote(64)]), 'A Minor'); }); test('identifies diminished and augmented triads', () { // C Diminished (C, Eb, Gb) expect(identifyChord([const MidiNote(60), const MidiNote(63), const MidiNote(66)]), 'C Diminished'); // C Augmented (C, E, G#) expect(identifyChord([const MidiNote(60), const MidiNote(64), const MidiNote(68)]), 'C Augmented'); }); test('identifies 7th chords', () { // C Maj7 (C, E, G, B) expect(identifyChord([const MidiNote(60), const MidiNote(64), const MidiNote(67), const MidiNote(71)]), 'C Maj 7'); // C Dom7 (C, E, G, Bb) expect(identifyChord([const MidiNote(60), const MidiNote(64), const MidiNote(67), const MidiNote(70)]), 'C Dom 7'); // C Min7 (C, Eb, G, Bb) expect(identifyChord([const MidiNote(60), const MidiNote(63), const MidiNote(67), const MidiNote(70)]), 'C Min 7'); }); test('identifies inversions (slash chords)', () { // C Major first inversion (E, G, C) -> C Major / E expect(identifyChord([const MidiNote(64), const MidiNote(67), const MidiNote(72)]), 'C Major / E'); // C Major second inversion (G, C, E) -> C Major / G expect(identifyChord([const MidiNote(67), const MidiNote(72), const MidiNote(76)]), 'C Major / G'); }); test('identifies power chords', () { // C5 (C, G) expect(identifyChord([const MidiNote(60), const MidiNote(67)]), 'C 5'); }); test('identifies sus chords', () { // Csus2 (C, D, G) expect(identifyChord([const MidiNote(60), const MidiNote(62), const MidiNote(67)]), 'C sus2'); // Csus4 (C, F, G) expect(identifyChord([const MidiNote(60), const MidiNote(65), const MidiNote(67)]), 'C sus4'); }); test('handles multiple octaves and duplicate notes', () { // C Major with extra C and E expect(identifyChord([ const MidiNote(60), // C4 const MidiNote(64), // E4 const MidiNote(67), // G4 const MidiNote(72), // C5 const MidiNote(76), // E5 ]), 'C Major'); }); test('identifies rootless 7th chords', () { // C dom7 rootless (E, Bb) played as (E, Bb, C) -> wait, the dictionary has [0, 4, 10] // That means C, E, Bb. expect(identifyChord([const MidiNote(60), const MidiNote(64), const MidiNote(70)]), 'C Dom 7'); }); test('falls back to note symbols for unknown chords', () { // Random cluster that isn't a common chord final result = identifyChord([const MidiNote(60), const MidiNote(61), const MidiNote(62)]); expect(result, contains('C-C#-D')); }); }); } ================================================ FILE: test/src/services/player_test.dart ================================================ import 'package:flutter/services.dart'; import 'package:flutter_piano/src/services/player.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); group('PlayerService', () { test('initializes and loads soundfont', () async { // Mock rootBundle.load // This might fail if dart_melty_soundfont tries to render // or if PcmAudioPlayer throws. // For now, let's see if we can just get past the load. // Actually, testing PlayerService is hard due to its dependencies. // I'll skip deep testing of the audio engine and focus on the hooks. }); }); } ================================================ FILE: test/src/services/settings_test.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_piano/src/models/settings_models.dart'; import 'package:flutter_piano/src/services/settings.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:shared_preferences/shared_preferences.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); group('SettingsService', () { late SharedPreferences prefs; setUp(() async { SharedPreferences.setMockInitialValues({ 'disableScroll': true, 'splitKeyboard': false, 'themeColor': Colors.blue.toARGB32(), 'themeMode': 'dark', 'invertKeys': true, 'keyWidth': 100.0, 'keyLabels': 'none', 'colorRole': 'primary', 'haptics': false, 'locale': 'fr', }); prefs = await SharedPreferences.getInstance(); }); test('loads initial values from SharedPreferences', () async { final service = SettingsService(prefs); expect(service.disableScroll.value, true); expect(service.splitKeyboard.value, false); expect(service.themeColor.value.toARGB32(), Colors.blue.toARGB32()); expect(service.themeMode.value, ThemeMode.dark); expect(service.invertKeys.value, true); expect(service.keyWidth.value, 100.0); expect(service.keyLabels.value, PitchLabels.none); expect(service.colorRole.value, ColorRole.primary); expect(service.haptics.value, false); expect(service.locale.value, const Locale('fr')); }); test('updates SharedPreferences when values change', () async { final service = SettingsService(prefs); service.disableScroll.value = false; expect(prefs.getBool('disableScroll'), false); service.splitKeyboard.value = true; expect(prefs.getBool('splitKeyboard'), true); service.themeColor.value = Colors.red; expect(prefs.getInt('themeColor'), Colors.red.toARGB32()); service.themeMode.value = ThemeMode.light; expect(prefs.getString('themeMode'), 'light'); service.invertKeys.value = false; expect(prefs.getBool('invertKeys'), false); service.keyWidth.value = 120.0; expect(prefs.getDouble('keyWidth'), 120.0); service.keyLabels.value = PitchLabels.both; expect(prefs.getString('keyLabels'), 'both'); service.colorRole.value = ColorRole.monoChrome; expect(prefs.getString('colorRole'), 'monoChrome'); service.haptics.value = true; expect(prefs.getBool('haptics'), true); service.locale.value = const Locale('en'); expect(prefs.getString('locale'), 'en'); service.locale.value = null; expect(prefs.containsKey('locale'), false); }); test('defaults to standard values if SharedPreferences is empty', () async { SharedPreferences.setMockInitialValues({}); prefs = await SharedPreferences.getInstance(); final service = SettingsService(prefs); expect(service.disableScroll.value, false); expect(service.splitKeyboard.value, true); expect(service.themeColor.value, Colors.red); expect(service.themeMode.value, ThemeMode.light); expect(service.invertKeys.value, false); expect(service.keyWidth.value, 80.0); expect(service.keyLabels.value, PitchLabels.both); expect(service.colorRole.value, ColorRole.monoChrome); expect(service.haptics.value, true); expect(service.locale.value, null); }); }); } ================================================ FILE: test/ui/hooks/use_chord_recognition_test.dart ================================================ import 'package:flutter_hooks_test/flutter_hooks_test.dart'; import 'package:flutter_piano/ui/hooks/use_chord_recognition.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group('useChordRecognition', () { testWidgets('initial state is empty', (tester) async { final result = await buildHook(() => useChordRecognition()); expect(result.current.chord, ''); }); testWidgets('onNoteOn adds notes and updates chord', (tester) async { final result = await buildHook(() => useChordRecognition()); await act(() => result.current.onNoteOn(60)); // C expect(result.current.chord, 'C'); await act(() => result.current.onNoteOn(64)); // E await act(() => result.current.onNoteOn(67)); // G expect(result.current.chord, 'C Major'); }); testWidgets('onNoteOff removes notes and updates chord', (tester) async { final result = await buildHook(() => useChordRecognition()); await act(() => result.current.onNoteOn(60)); await act(() => result.current.onNoteOn(64)); await act(() => result.current.onNoteOn(67)); expect(result.current.chord, 'C Major'); await act(() => result.current.onNoteOff(64)); expect(result.current.chord, 'C 5'); // C and G await act(() => result.current.onNoteOff(67)); expect(result.current.chord, 'C'); }); testWidgets('clear removes all notes', (tester) async { final result = await buildHook(() => useChordRecognition()); await act(() => result.current.onNoteOn(60)); await act(() => result.current.onNoteOn(64)); expect(result.current.chord, contains('C-E')); await act(() => result.current.clear()); expect(result.current.chord, ''); }); }); } ================================================ FILE: test/ui/hooks/use_octave_test.dart ================================================ import 'package:flutter_hooks_test/flutter_hooks_test.dart'; import 'package:flutter_piano/ui/hooks/use_octave.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group('useOctave', () { testWidgets('initial state is 0', (tester) async { final result = await buildHook(() => useOctave()); expect(result.current.offset, 0); }); testWidgets('adjust increases and decreases offset', (tester) async { final result = await buildHook(() => useOctave()); await act(() => result.current.adjust(1)); expect(result.current.offset, 1); await act(() => result.current.adjust(-2)); expect(result.current.offset, -1); }); testWidgets('adjust is clamped at -5 and 5', (tester) async { final result = await buildHook(() => useOctave()); // Max nOctaves=7, clamping at -5 to 5 ( -7+2 to 7-2 ) await act(() => result.current.adjust(10)); expect(result.current.offset, 5); await act(() => result.current.adjust(-20)); expect(result.current.offset, -5); }); testWidgets('reset sets offset to 0', (tester) async { final result = await buildHook(() => useOctave()); await act(() => result.current.adjust(3)); expect(result.current.offset, 3); await act(() => result.current.reset()); expect(result.current.offset, 0); }); }); } ================================================ FILE: test/ui/hooks/use_piano_keyboard_test.dart ================================================ import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_hooks_test/flutter_hooks_test.dart'; import 'package:flutter_piano/ui/hooks/use_octave.dart'; import 'package:flutter_piano/ui/hooks/use_piano_keyboard.dart'; import 'package:flutter_piano/ui/hooks/use_player.dart'; import 'package:flutter_piano/ui/hooks/use_sustain.dart'; import 'package:flutter_piano/ui/hooks/use_velocity.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mocktail/mocktail.dart'; class MockPianoPlayer extends Mock implements PianoPlayer {} void main() { late MockPianoPlayer mockPlayer; late FocusNode focusNode; setUp(() { mockPlayer = MockPianoPlayer(); focusNode = FocusNode(); when(() => mockPlayer.play(any())).thenAnswer((_) async {}); when(() => mockPlayer.stop(any())).thenAnswer((_) async {}); }); group('usePianoKeyboard', () { testWidgets('triggers play on KeyDownEvent (KeyA -> C4)', (tester) async { final octave = OctaveState(offset: 0, adjust: (_) {}, reset: () {}); final velocity = VelocityState(value: 127, adjust: (_) {}); final sustain = SustainState(value: false, setSustain: (_) {}); final result = await buildHook(() => usePianoKeyboard( octave: octave, velocity: velocity, sustain: sustain, player: mockPlayer, )); final handler = result.current; final event = KeyDownEvent( logicalKey: LogicalKeyboardKey.keyA, physicalKey: PhysicalKeyboardKey.keyA, timeStamp: Duration.zero, ); final keyResult = handler(focusNode, event); expect(keyResult, KeyEventResult.handled); verify(() => mockPlayer.play(60)).called(1); }); testWidgets('triggers stop on KeyUpEvent (KeyA -> C4)', (tester) async { final octave = OctaveState(offset: 0, adjust: (_) {}, reset: () {}); final velocity = VelocityState(value: 127, adjust: (_) {}); final sustain = SustainState(value: false, setSustain: (_) {}); final result = await buildHook(() => usePianoKeyboard( octave: octave, velocity: velocity, sustain: sustain, player: mockPlayer, )); final handler = result.current; handler(focusNode, KeyDownEvent( logicalKey: LogicalKeyboardKey.keyA, physicalKey: PhysicalKeyboardKey.keyA, timeStamp: Duration.zero, )); final event = KeyUpEvent( logicalKey: LogicalKeyboardKey.keyA, physicalKey: PhysicalKeyboardKey.keyA, timeStamp: Duration.zero, ); final keyResult = handler(focusNode, event); expect(keyResult, KeyEventResult.handled); verify(() => mockPlayer.stop(60)).called(1); }); testWidgets('adjusts octave with Z and X keys', (tester) async { int adjusted = 0; final octave = OctaveState(offset: 0, adjust: (v) => adjusted = v, reset: () {}); final velocity = VelocityState(value: 127, adjust: (_) {}); final sustain = SustainState(value: false, setSustain: (_) {}); final result = await buildHook(() => usePianoKeyboard( octave: octave, velocity: velocity, sustain: sustain, player: mockPlayer, )); final handler = result.current; handler(focusNode, KeyDownEvent( logicalKey: LogicalKeyboardKey.keyZ, physicalKey: PhysicalKeyboardKey.keyZ, timeStamp: Duration.zero, )); expect(adjusted, -1); handler(focusNode, KeyDownEvent( logicalKey: LogicalKeyboardKey.keyX, physicalKey: PhysicalKeyboardKey.keyX, timeStamp: Duration.zero, )); expect(adjusted, 1); }); testWidgets('adjusts velocity with C and V keys', (tester) async { int adjusted = 0; final octave = OctaveState(offset: 0, adjust: (_) {}, reset: () {}); final velocity = VelocityState(value: 127, adjust: (v) => adjusted = v); final sustain = SustainState(value: false, setSustain: (_) {}); final result = await buildHook(() => usePianoKeyboard( octave: octave, velocity: velocity, sustain: sustain, player: mockPlayer, )); final handler = result.current; handler(focusNode, KeyDownEvent( logicalKey: LogicalKeyboardKey.keyC, physicalKey: PhysicalKeyboardKey.keyC, timeStamp: Duration.zero, )); expect(adjusted, -1); handler(focusNode, KeyDownEvent( logicalKey: LogicalKeyboardKey.keyV, physicalKey: PhysicalKeyboardKey.keyV, timeStamp: Duration.zero, )); expect(adjusted, 1); }); testWidgets('triggers sustain with Space key', (tester) async { bool sustained = false; final octave = OctaveState(offset: 0, adjust: (_) {}, reset: () {}); final velocity = VelocityState(value: 127, adjust: (_) {}); final sustain = SustainState(value: false, setSustain: (v) => sustained = v); final result = await buildHook(() => usePianoKeyboard( octave: octave, velocity: velocity, sustain: sustain, player: mockPlayer, )); final handler = result.current; handler(focusNode, KeyDownEvent( logicalKey: LogicalKeyboardKey.space, physicalKey: PhysicalKeyboardKey.space, timeStamp: Duration.zero, )); expect(sustained, true); handler(focusNode, KeyUpEvent( logicalKey: LogicalKeyboardKey.space, physicalKey: PhysicalKeyboardKey.space, timeStamp: Duration.zero, )); expect(sustained, false); }); testWidgets('respects octave offset for MIDI notes', (tester) async { final octave = OctaveState(offset: 1, adjust: (_) {}, reset: () {}); final velocity = VelocityState(value: 127, adjust: (_) {}); final sustain = SustainState(value: false, setSustain: (_) {}); final result = await buildHook(() => usePianoKeyboard( octave: octave, velocity: velocity, sustain: sustain, player: mockPlayer, )); final handler = result.current; handler(focusNode, KeyDownEvent( logicalKey: LogicalKeyboardKey.keyA, physicalKey: PhysicalKeyboardKey.keyA, timeStamp: Duration.zero, )); verify(() => mockPlayer.play(72)).called(1); }); }); } ================================================ FILE: test/ui/hooks/use_player_test.dart ================================================ import 'package:flutter_hooks_test/flutter_hooks_test.dart'; import 'package:flutter_piano/src/services/injection.dart'; import 'package:flutter_piano/src/services/player.dart'; import 'package:flutter_piano/ui/hooks/use_player.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mocktail/mocktail.dart'; class MockPlayerService extends Mock implements PlayerService {} void main() { late MockPlayerService mockPlayerService; setUp(() { mockPlayerService = MockPlayerService(); getIt.registerSingleton(mockPlayerService); }); tearDown(() { getIt.reset(); }); group('usePlayer', () { testWidgets('play() calls service.play() with correct sustain', (tester) async { when(() => mockPlayerService.play(60, sustain: true)).thenAnswer((_) async {}); final result = await buildHook(() => usePlayer(sustain: true)); await act(() => result.current.play(60)); verify(() => mockPlayerService.play(60, sustain: true)).called(1); }); testWidgets('stop() calls service.stop() with correct sustain', (tester) async { when(() => mockPlayerService.stop(60, sustain: false)).thenAnswer((_) async {}); final result = await buildHook(() => usePlayer(sustain: false)); await act(() => result.current.stop(60)); verify(() => mockPlayerService.stop(60, sustain: false)).called(1); }); }); } ================================================ FILE: test/ui/hooks/use_sustain_test.dart ================================================ import 'package:flutter_hooks_test/flutter_hooks_test.dart'; import 'package:flutter_piano/src/services/injection.dart'; import 'package:flutter_piano/src/services/player.dart'; import 'package:flutter_piano/ui/hooks/use_sustain.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mocktail/mocktail.dart'; class MockPlayerService extends Mock implements PlayerService {} void main() { late MockPlayerService mockPlayerService; setUp(() { mockPlayerService = MockPlayerService(); when(() => mockPlayerService.stopSustain()).thenAnswer((_) async {}); getIt.registerSingleton(mockPlayerService); }); tearDown(() { getIt.reset(); }); group('useSustain', () { testWidgets('initial state is false', (tester) async { final result = await buildHook(() => useSustain()); expect(result.current.value, false); }); testWidgets('setSustain updates value', (tester) async { final result = await buildHook(() => useSustain()); await act(() => result.current.setSustain(true)); expect(result.current.value, true); await act(() => result.current.setSustain(false)); expect(result.current.value, false); }); testWidgets('calls player.stopSustain() when sustain is set to false', (tester) async { when(() => mockPlayerService.stopSustain()).thenAnswer((_) async {}); final result = await buildHook(() => useSustain()); // Set to true first await act(() => result.current.setSustain(true)); verifyNever(() => mockPlayerService.stopSustain()); // Set to false await act(() => result.current.setSustain(false)); verify(() => mockPlayerService.stopSustain()).called(1); }); }); } ================================================ FILE: test/ui/hooks/use_velocity_test.dart ================================================ import 'package:flutter_hooks_test/flutter_hooks_test.dart'; import 'package:flutter_piano/ui/hooks/use_velocity.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group('useVelocity', () { testWidgets('initial state is 127', (tester) async { final result = await buildHook(() => useVelocity()); expect(result.current.value, 127); }); testWidgets('adjust increases and decreases velocity', (tester) async { final result = await buildHook(() => useVelocity()); await act(() => result.current.adjust(-27)); expect(result.current.value, 100); await act(() => result.current.adjust(10)); expect(result.current.value, 110); }); testWidgets('adjust is clamped between 0 and 127', (tester) async { final result = await buildHook(() => useVelocity()); await act(() => result.current.adjust(10)); expect(result.current.value, 127); await act(() => result.current.adjust(-200)); expect(result.current.value, 0); }); }); } ================================================ FILE: web/.nojekyll ================================================ ================================================ FILE: web/CNAME ================================================ pocketpiano.app ================================================ FILE: web/browserconfig.xml ================================================ #da532c ================================================ FILE: web/index.html ================================================ The Pocket Piano ================================================ FILE: web/manifest.json ================================================ { "name": "The Pocket Piano", "short_name": "Pocket Piano", "start_url": ".", "display": "standalone", "background_color": "#000000", "theme_color": "#FF0000", "description": "A Cross platform Midi Piano built with Flutter.", "orientation": "portrait-primary", "prefer_related_applications": true, "related_applications": [ { "platform": "play", "url": "https://play.google.com/store/apps/details?id=com.appleeducate.flutter_piano&hl=en_US", "id": "com.appleeducate.flutter_piano" }, { "platform": "itunes", "url": "https://apps.apple.com/us/app/the-pocket-piano/id1453992672" } ], "icons": [ { "src": "icons/Icon-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "icons/Icon-512.png", "sizes": "512x512", "type": "image/png" } ] }