├── example
├── ios
│ ├── Flutter
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── AppFrameworkInfo.plist
│ ├── Runner
│ │ ├── Runner-Bridging-Header.h
│ │ ├── Assets.xcassets
│ │ │ ├── LaunchImage.imageset
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ ├── README.md
│ │ │ │ └── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ │ └── Info.plist
│ ├── Runner.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── xcshareddata
│ │ │ └── xcschemes
│ │ │ │ └── Runner.xcscheme
│ │ └── project.pbxproj
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ └── .gitignore
├── macos
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Runner
│ │ ├── Configs
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ ├── Warnings.xcconfig
│ │ │ └── AppInfo.xcconfig
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ ├── app_icon_64.png
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.swift
│ │ ├── Release.entitlements
│ │ ├── DebugProfile.entitlements
│ │ ├── MainFlutterWindow.swift
│ │ ├── Info.plist
│ │ └── Base.lproj
│ │ │ └── MainMenu.xib
│ ├── .gitignore
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner.xcodeproj
│ │ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ │ └── project.pbxproj
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ └── Icon-512.png
│ ├── manifest.json
│ └── index.html
├── android
│ ├── gradle.properties
│ ├── app
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── drawable-v21
│ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── values
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ └── values-night
│ │ │ │ │ │ └── styles.xml
│ │ │ │ ├── kotlin
│ │ │ │ │ └── com
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ └── AndroidManifest.xml
│ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ ├── .gitignore
│ ├── build.gradle
│ └── settings.gradle
├── .metadata
├── README.md
├── .gitignore
├── test
│ └── widget_test.dart
├── pubspec.yaml
├── lib
│ └── main.dart
└── pubspec.lock
├── screenshot.png
├── lib
├── flutter_chord.dart
└── src
│ ├── model
│ ├── chord_lyrics_document.dart
│ └── chord_lyrics_line.dart
│ ├── chord_transposer.dart
│ ├── chord_parser.dart
│ └── lyrics_renderer.dart
├── .metadata
├── CHANGELOG.md
├── .github
└── workflows
│ └── test.yml
├── LICENSE
├── test
├── chord_lyrics_line_test.dart
├── chord_parser_test.dart
└── chord_processor_test.dart
├── README.md
├── .gitignore
├── pubspec.yaml
└── pubspec.lock
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/screenshot.png
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/xcuserdata/
7 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paurakhsharma/flutter_chord/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/lib/flutter_chord.dart:
--------------------------------------------------------------------------------
1 | library flutter_chord;
2 |
3 | export 'src/chord_parser.dart';
4 | export 'src/lyrics_renderer.dart';
5 | export 'src/model/chord_lyrics_document.dart';
6 | export 'src/model/chord_lyrics_line.dart';
7 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 |
9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
10 | }
11 |
--------------------------------------------------------------------------------
/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
7 |
--------------------------------------------------------------------------------
/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: f4abaa0735eba4dfd8f33f73363911d63931fe03
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: f4abaa0735eba4dfd8f33f73363911d63931fe03
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/lib/src/model/chord_lyrics_document.dart:
--------------------------------------------------------------------------------
1 | import 'chord_lyrics_line.dart';
2 |
3 | class ChordLyricsDocument {
4 | final List chordLyricsLines;
5 | final int? capo;
6 | final String? title;
7 | final String? artist;
8 | final String? key;
9 |
10 | ChordLyricsDocument(this.chordLyricsLines,
11 | {this.capo, this.title, this.artist, this.key});
12 | }
13 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 | }
7 |
8 | rootProject.buildDir = '../build'
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | project.evaluationDependsOn(':app')
12 | }
13 |
14 | tasks.register("clean", Delete) {
15 | delete rootProject.buildDir
16 | }
17 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | 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.
--------------------------------------------------------------------------------
/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.1.2
2 | * Fix incompatibility issues with Flutter 3.0.0
3 | ## 0.1.1
4 | * Leading and trailing widget
5 | * Customizable extra line height
6 |
7 | ## 0.1.0
8 | * Thanks to @auhsor, long lyrics are splitted to multiple lines
9 | to overcome overflow.
10 |
11 | ## 0.0.7
12 | * Fix screenshot
13 |
14 | ## 0.0.6
15 | * Do not take textScaleFactor into account,
16 | to fix different chordWidth in different devices
17 |
18 | ## 0.0.5
19 | * Fix Sharp chords transpose issue
20 |
21 | ## 0.0.4
22 | * Auto Scroll
23 | * Transpose
24 |
25 | ## 0.0.3
26 | * Export models
27 |
28 | ## 0.0.2
29 | * Try to fix screenshot
30 |
31 | ## 0.0.1
32 |
33 | * Initial release.
34 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/ephemeral/
22 | Flutter/app.flx
23 | Flutter/app.zip
24 | Flutter/flutter_assets/
25 | Flutter/flutter_export_environment.sh
26 | ServiceDefinitions.json
27 | Runner/GeneratedPluginRegistrant.*
28 |
29 | # Exceptions to above rules.
30 | !default.mode1v3
31 | !default.mode2v3
32 | !default.pbxuser
33 | !default.perspectivev3
34 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "7.4.2" apply false
22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23 | }
24 |
25 | include ":app"
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Test
2 |
3 | # Run on every pull-requests
4 | on: [push, pull_request]
5 |
6 |
7 | jobs:
8 | test:
9 | # This job will run on ubuntu virtual machine
10 | runs-on: ubuntu-latest
11 | steps:
12 |
13 | # Setup Java environment in order to build the Android app.
14 | - uses: actions/checkout@v2
15 | - uses: actions/setup-java@v1
16 | with:
17 | java-version: '12.x'
18 |
19 | # Setup the flutter environment.
20 | - uses: subosito/flutter-action@v1
21 | with:
22 | channel: 'stable'
23 |
24 | # Get flutter dependencies.
25 | - run: flutter pub get
26 |
27 | # Check for any formatting issues in the code.
28 | - run: dart format -l 80 --set-exit-if-changed .
29 |
30 | # Statically analyze the Dart code for any errors.
31 | - run: flutter analyze .
32 |
33 | # Run unit and widget tests for our flutter project.
34 | - run: flutter test
35 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Paurakh Sharma Hunagain
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:example/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/test/chord_lyrics_line_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_chord/flutter_chord.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 |
4 | void main() {
5 | testWidgets('isStartOfChorus', (WidgetTester tester) async {
6 | final ChordLyricsLine line = ChordLyricsLine();
7 | line.lyrics = "{start_of_chorus} I Am the Start of the Chorus {soc}";
8 | final isStart = line.isStartOfChorus();
9 | expect(isStart, true);
10 | expect(line.lyrics, "I Am the Start of the Chorus");
11 | line.lyrics = "I Am Not the Start of the Chorus";
12 | final isNotStart = line.isStartOfChorus();
13 | expect(isNotStart, false);
14 | });
15 |
16 | testWidgets('isEndOfChorus', (WidgetTester tester) async {
17 | final ChordLyricsLine line = ChordLyricsLine();
18 | line.lyrics = "{end_of_chorus} I Am the End of the Chorus {eoc}";
19 | final isEnd = line.isEndOfChorus();
20 | expect(isEnd, true);
21 | line.lyrics = "I Am Not the End of the Chorus";
22 | final isNotEnd = line.isEndOfChorus();
23 | expect(isNotEnd, false);
24 | });
25 |
26 | testWidgets('isComment', (WidgetTester tester) async {
27 | final ChordLyricsLine line = ChordLyricsLine();
28 | line.lyrics = "{comment: I Am a comment}";
29 | final isComment = line.isComment();
30 | expect(isComment, true);
31 | line.lyrics = "I Am a comment";
32 | final isNotEnd = line.isComment();
33 | expect(isNotEnd, false);
34 | });
35 | }
36 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | compileSdk 34
27 |
28 | sourceSets {
29 | main.java.srcDirs += 'src/main/kotlin'
30 | }
31 |
32 | defaultConfig {
33 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
34 | applicationId "com.example.example"
35 | minSdkVersion flutter.minSdkVersion
36 | targetSdkVersion 34
37 | versionCode flutterVersionCode.toInteger()
38 | versionName flutterVersionName
39 | }
40 |
41 | buildTypes {
42 | release {
43 | // TODO: Add your own signing config for the release build.
44 | // Signing with the debug keys for now, so `flutter run --release` works.
45 | signingConfig signingConfigs.debug
46 | }
47 | }
48 | }
49 |
50 | flutter {
51 | source '../..'
52 | }
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter_chord
2 |
3 | [](https://github.com/paurakhsharma/flutter_chord/actions/workflows/test.yml)
4 |
5 | Chord parser for Flutter apps.
6 |
7 | ## Features
8 |
9 | - Transpose Chord
10 | - Auto Scroll
11 |
12 |
13 |
14 | ## Usage
15 |
16 | **1) Render the Lyrics and Chords directly.**
17 |
18 | ```dart
19 | final textStyle = TextStyle(fontSize: 18, color: Colors.white);
20 | final chordStyle = TextStyle(fontSize: 20, color: Colors.green);
21 |
22 | final lyrics = '''
23 | [C]Give me Freedom, [F]Give me fire
24 | [Am] Give me reason, [G]Take me higher
25 | ''';
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return LyricsRenderer(
30 | lyrics: _lyrics,
31 | textStyle: textStyle,
32 | chordStyle: chordStyle,
33 | widgetPadding: 50,
34 | onTapChord: (String chord) {
35 | print('pressed chord: $chord');
36 | },
37 | transposeIncrement: 0,
38 | scrollSpeed: 0,
39 | );
40 | }
41 | ```
42 |
43 | **2. Get a parsed `ChordLyricsDocument` and style it as you like.**
44 |
45 | ```dart
46 |
47 | final textStyle = TextStyle(fontSize: 18, color: Colors.white);
48 | final chordStyle = TextStyle(fontSize: 20, color: Colors.green);
49 |
50 | final lyrics = '''
51 | [C]Give me Freedom , [F]Give me fire
52 | [Am] Give me reason , [G]Take me higher
53 | ''';
54 |
55 | ChordProcessor _chordProcessor = ChordProcessor(context);
56 | ChordLyricsDocument chordLyricsDocument = _chordProcessor.processText(
57 | text: lyrics,
58 | lyricsStyle: textStyle,
59 | chordStyle: chordStyle,
60 | transposeIncrement: 0,
61 | );
62 | ```
63 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | build/
32 |
33 | # Android related
34 | **/android/**/gradle-wrapper.jar
35 | **/android/.gradle
36 | **/android/captures/
37 | **/android/gradlew
38 | **/android/gradlew.bat
39 | **/android/local.properties
40 | **/android/**/GeneratedPluginRegistrant.java
41 |
42 | # iOS/XCode related
43 | **/ios/**/*.mode1v3
44 | **/ios/**/*.mode2v3
45 | **/ios/**/*.moved-aside
46 | **/ios/**/*.pbxuser
47 | **/ios/**/*.perspectivev3
48 | **/ios/**/*sync/
49 | **/ios/**/.sconsign.dblite
50 | **/ios/**/.tags*
51 | **/ios/**/.vagrant/
52 | **/ios/**/DerivedData/
53 | **/ios/**/Icon?
54 | **/ios/**/Pods/
55 | **/ios/**/.symlinks/
56 | **/ios/**/profile
57 | **/ios/**/xcuserdata
58 | **/ios/.generated/
59 | **/ios/Flutter/App.framework
60 | **/ios/Flutter/Flutter.framework
61 | **/ios/Flutter/Flutter.podspec
62 | **/ios/Flutter/Generated.xcconfig
63 | **/ios/Flutter/ephemeral
64 | **/ios/Flutter/app.flx
65 | **/ios/Flutter/app.zip
66 | **/ios/Flutter/flutter_assets/
67 | **/ios/Flutter/flutter_export_environment.sh
68 | **/ios/ServiceDefinitions.json
69 | **/ios/Runner/GeneratedPluginRegistrant.*
70 |
71 | # Exceptions to above rules.
72 | !**/ios/**/default.mode1v3
73 | !**/ios/**/default.mode2v3
74 | !**/ios/**/default.pbxuser
75 | !**/ios/**/default.perspectivev3
76 |
77 | .vscode/
78 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_chord
2 | description: Lyrics Chord parser and renderer for Flutter. It also comes with transpose and auto-scroll features.
3 | version: 0.1.2
4 | repository: https://github.com/paurakhsharma/flutter_chord
5 |
6 | environment:
7 | sdk: '>=2.12.0 <3.24.4'
8 | flutter: '>=1.17.0'
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | dev_dependencies:
15 | flutter_test:
16 | sdk: flutter
17 | mockito: ^5.0.17
18 |
19 | # For information on the generic Dart part of this file, see the
20 | # following page: https://dart.dev/tools/pub/pubspec
21 |
22 | # The following section is specific to Flutter.
23 | flutter:
24 |
25 | # To add assets to your package, add an assets section, like this:
26 | # assets:
27 | # - images/a_dot_burr.jpeg
28 | # - images/a_dot_ham.jpeg
29 | #
30 | # For details regarding assets in packages, see
31 | # https://flutter.dev/assets-and-images/#from-packages
32 | #
33 | # An image asset can refer to one or more resolution-specific "variants", see
34 | # https://flutter.dev/assets-and-images/#resolution-aware.
35 |
36 | # To add custom fonts to your package, add a fonts section here,
37 | # in this "flutter" section. Each entry in this list should have a
38 | # "family" key with the font family name, and a "fonts" key with a
39 | # list giving the asset and other descriptors for the font. For
40 | # example:
41 | # fonts:
42 | # - family: Schyler
43 | # fonts:
44 | # - asset: fonts/Schyler-Regular.ttf
45 | # - asset: fonts/Schyler-Italic.ttf
46 | # style: italic
47 | # - family: Trajan Pro
48 | # fonts:
49 | # - asset: fonts/TrajanPro.ttf
50 | # - asset: fonts/TrajanPro_Bold.ttf
51 | # weight: 700
52 | #
53 | # For details regarding fonts in packages, see
54 | # https://flutter.dev/custom-fonts/#from-packages
55 |
--------------------------------------------------------------------------------
/lib/src/model/chord_lyrics_line.dart:
--------------------------------------------------------------------------------
1 | class ChordLyricsLine {
2 | List chords;
3 | String lyrics;
4 |
5 | ChordLyricsLine()
6 | : chords = [],
7 | lyrics = '';
8 |
9 | ChordLyricsLine.line(this.chords, this.lyrics);
10 |
11 | /// Remove also the keyword
12 | bool isStartOfChorus() {
13 | const String startOfChorusAbbreviation = '{soc}';
14 | const String startOfChorus = '{start_of_chorus}';
15 | bool out = lyrics.contains(startOfChorus) ||
16 | lyrics.contains(startOfChorusAbbreviation);
17 | if (out) {
18 | lyrics = lyrics.replaceAll(startOfChorus, '');
19 | lyrics = lyrics.replaceAll(startOfChorusAbbreviation, '').trim();
20 | }
21 | return out;
22 | }
23 |
24 | /// Remove also the keyword
25 | bool isEndOfChorus() {
26 | const String endOfChorusAbbreviation = '{eoc}';
27 | const String endOfChorus = '{end_of_chorus}';
28 | bool out = lyrics.contains(endOfChorus) ||
29 | lyrics.contains(endOfChorusAbbreviation);
30 | if (out) {
31 | lyrics = lyrics.replaceAll(endOfChorus, '');
32 | lyrics = lyrics.replaceAll(endOfChorusAbbreviation, '').trim();
33 | }
34 | return out;
35 | }
36 |
37 | /// Remove also the keyword
38 | bool isComment() {
39 | const String comment = '{comment:';
40 | bool out = lyrics.contains(comment);
41 | if (out) {
42 | lyrics = lyrics.replaceAll(comment, '');
43 | lyrics = lyrics.replaceAll('}', '').trim();
44 | }
45 | return out;
46 | }
47 |
48 | @override
49 | String toString() {
50 | return 'ChordLyricsLine($chords, lyrics: $lyrics)';
51 | }
52 | }
53 |
54 | class Chord {
55 | double leadingSpace;
56 | String chordText;
57 |
58 | Chord(this.leadingSpace, this.chordText);
59 |
60 | @override
61 | String toString() {
62 | return 'Chord(leadingSpace: $leadingSpace, chordText: $chordText)';
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
14 |
18 |
22 |
27 |
31 |
32 |
33 |
34 |
35 |
36 |
38 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 | description: Example app of the Flutter Chord package.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.12.0 <3.24.4"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 | flutter_chord:
27 | path: ../
28 |
29 |
30 | # The following adds the Cupertino Icons font to your application.
31 | # Use with the CupertinoIcons class for iOS style icons.
32 | cupertino_icons: ^1.0.2
33 |
34 | dev_dependencies:
35 | flutter_test:
36 | sdk: flutter
37 |
38 | # For information on the generic Dart part of this file, see the
39 | # following page: https://dart.dev/tools/pub/pubspec
40 |
41 | # The following section is specific to Flutter.
42 | flutter:
43 |
44 | # The following line ensures that the Material Icons font is
45 | # included with your application, so that you can use the icons in
46 | # the material Icons class.
47 | uses-material-design: true
48 |
49 | # To add assets to your application, add an assets section, like this:
50 | # assets:
51 | # - images/a_dot_burr.jpeg
52 | # - images/a_dot_ham.jpeg
53 |
54 | # An image asset can refer to one or more resolution-specific "variants", see
55 | # https://flutter.dev/assets-and-images/#resolution-aware.
56 |
57 | # For details regarding adding assets from package dependencies, see
58 | # https://flutter.dev/assets-and-images/#from-packages
59 |
60 | # To add custom fonts to your application, add a fonts section here,
61 | # in this "flutter" section. Each entry in this list should have a
62 | # "family" key with the font family name, and a "fonts" key with a
63 | # list giving the asset and other descriptors for the font. For
64 | # example:
65 | # fonts:
66 | # - family: Schyler
67 | # fonts:
68 | # - asset: fonts/Schyler-Regular.ttf
69 | # - asset: fonts/Schyler-Italic.ttf
70 | # style: italic
71 | # - family: Trajan Pro
72 | # fonts:
73 | # - asset: fonts/TrajanPro.ttf
74 | # - asset: fonts/TrajanPro_Bold.ttf
75 | # weight: 700
76 | #
77 | # For details regarding fonts from package dependencies,
78 | # see https://flutter.dev/custom-fonts/#from-packages
79 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
64 |
65 |
71 |
73 |
79 |
80 |
81 |
82 |
84 |
85 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/lib/src/chord_transposer.dart:
--------------------------------------------------------------------------------
1 | enum ChordNotation {
2 | italian,
3 | american,
4 | german,
5 | traditionalGerman,
6 | french,
7 | portuguese
8 | }
9 |
10 | class ChordTransposer {
11 | ChordTransposer(this.chordNotation, {this.transpose = 0}) {
12 | switch (chordNotation) {
13 | case ChordNotation.italian:
14 | cycle = italianNotes;
15 | break;
16 | case ChordNotation.american:
17 | cycle = americanNotes;
18 | break;
19 | default:
20 | throw ('Other languages not implemented yet');
21 | }
22 | }
23 |
24 | final ChordNotation chordNotation;
25 | late List cycle;
26 | int transpose;
27 |
28 | static const List americanNotes = [
29 | "C",
30 | "C#",
31 | "D",
32 | "D#",
33 | "E",
34 | "F",
35 | "F#",
36 | "G",
37 | "G#",
38 | "A",
39 | "A#",
40 | "B"
41 | ];
42 |
43 | static const List italianNotes = [
44 | "Do",
45 | "Do#",
46 | "Re",
47 | "Re#",
48 | "Mi",
49 | "Fa",
50 | "Fa#",
51 | "Sol",
52 | "Sol#",
53 | "La",
54 | "La#",
55 | "Si"
56 | ];
57 |
58 | /// Transpose the chord text by the given increment
59 | String transposeChord(String chord) {
60 | if (transpose == 0) {
61 | return chord;
62 | }
63 | final List outChord = [];
64 |
65 | ///Repeat for every note in chord
66 | ///i.e. C/B
67 | for (final String partChord in chord.split('/')) {
68 | outChord.add(_processChord(partChord));
69 | }
70 | return outChord.join('/');
71 | }
72 |
73 | ///1. Find chord
74 | ///2. Find alterations
75 | ///3. Keep away the rest
76 | ///4. Transpose
77 | ///5. Join all together
78 | String _processChord(String chord) {
79 | /// 1. Find chord
80 | int index = cycle.lastIndexWhere((note) => chord.startsWith(note));
81 | if (index == -1) {
82 | return chord;
83 | }
84 | final String chordFound = cycle[index];
85 | String simpleChord = chord.substring(0, chordFound.length);
86 |
87 | ///String containing other annotations of the chord
88 | late String otherPartChord;
89 |
90 | if (chord.startsWith('b', simpleChord.length)) {
91 | otherPartChord = chord.substring(simpleChord.length + 1);
92 | } else {
93 | otherPartChord = chord.substring(simpleChord.length);
94 | }
95 |
96 | ///2. Find alteration & 3. Keep away the rest
97 | /// Meaning that some special characters was added
98 | if (simpleChord.length < chord.length) {
99 | simpleChord = _handleFlatOrSharp(chord, simpleChord);
100 |
101 | ///Update index of the chord (particulary useful in case of chord with flat)
102 | index = cycle.indexOf(simpleChord);
103 | }
104 |
105 | ///4. Transpose
106 | final int newInd = (index + transpose + cycle.length) % cycle.length;
107 | final String newChord = cycle[newInd];
108 |
109 | ///5. Join all together
110 | return newChord + otherPartChord;
111 | }
112 |
113 | ///Add sharp to chord if present, or transform flat to sharp if present and add it to chord
114 | String _handleFlatOrSharp(String chord, String simpleChord) {
115 | if (chord.startsWith('#', simpleChord.length)) {
116 | simpleChord += '#';
117 | }
118 | if (chord.startsWith('b', simpleChord.length)) {
119 | simpleChord = _fromFlatToSharp(simpleChord);
120 | }
121 | return simpleChord;
122 | }
123 |
124 | /// We suppose that [simpleChord] is the most basic form of the chord without flat or sharp in the end
125 | String _fromFlatToSharp(String simpleChord) {
126 | final int index = cycle.indexOf(simpleChord) - 1 + cycle.length;
127 | return cycle[index % cycle.length];
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/example/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | example
27 |
28 |
29 |
30 |
33 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/test/chord_parser_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_chord/src/chord_transposer.dart';
3 | import 'package:flutter_test/flutter_test.dart';
4 | import 'package:mockito/mockito.dart';
5 |
6 | class MockBuildContext extends Mock implements BuildContext {}
7 |
8 | void main() {
9 | test(
10 | 'Can transpose american chord by 1',
11 | () {
12 | final chordTable = [
13 | ["C", "C#"],
14 | ["C#", "D"],
15 | ["D", "D#"],
16 | ["E", "F"],
17 | ["A#", "B"],
18 | ];
19 | for (var chordPair in chordTable) {
20 | final transposedChord =
21 | ChordTransposer(ChordNotation.american, transpose: 1)
22 | .transposeChord(chordPair[0]);
23 | expect(transposedChord, chordPair[1]);
24 | }
25 | },
26 | );
27 |
28 | test(
29 | 'Can transpose italian chord by 1',
30 | () {
31 | final chordTable = [
32 | ["Do", "Do#"],
33 | ["Do#", "Re"],
34 | ["Re", "Re#"],
35 | ["Mi", "Fa"],
36 | ["La#", "Si"],
37 | ];
38 | for (var chordPair in chordTable) {
39 | final transposedChord =
40 | ChordTransposer(ChordNotation.italian, transpose: 1)
41 | .transposeChord(chordPair[0]);
42 | expect(transposedChord, chordPair[1]);
43 | }
44 | },
45 | );
46 |
47 | test(
48 | 'Can transpose flat italian chord by 1',
49 | () {
50 | final chordTable = [
51 | ["Dob", "Do"],
52 | ["Sib", "Si"],
53 | ["Mib", "Mi"],
54 | ["Reb", "Re"],
55 | ];
56 | for (var chordPair in chordTable) {
57 | final transposedChord =
58 | ChordTransposer(ChordNotation.italian, transpose: 1)
59 | .transposeChord(chordPair[0]);
60 | expect(transposedChord, chordPair[1]);
61 | }
62 | },
63 | );
64 |
65 | test(
66 | 'Can transpose more complex italian chords by 1',
67 | () {
68 | final chordTable = [
69 | ["Dob7", "Do7"],
70 | ["Si7/5", "Do7/5"],
71 | ["Sol/Si", "Sol#/Do"],
72 | ["Re4/7", "Re#4/7"],
73 | ["Doadd9", "Do#add9"],
74 | ];
75 | for (var chordPair in chordTable) {
76 | final transposedChord =
77 | ChordTransposer(ChordNotation.italian, transpose: 1)
78 | .transposeChord(chordPair[0]);
79 | expect(transposedChord, chordPair[1]);
80 | }
81 | },
82 | );
83 |
84 | test(
85 | 'Can transpose more complex american chords by 1',
86 | () {
87 | final chordTable = [
88 | ["Cb7", "C7"],
89 | ["B7/5", "C7/5"],
90 | ["G/B", "G#/C"],
91 | ["D4/7", "D#4/7"],
92 | ["Cadd9", "C#add9"],
93 | ];
94 | for (var chordPair in chordTable) {
95 | final transposedChord =
96 | ChordTransposer(ChordNotation.american, transpose: 1)
97 | .transposeChord(chordPair[0]);
98 | expect(transposedChord, chordPair[1]);
99 | }
100 | },
101 | );
102 |
103 | test(
104 | 'Can transpose american chord by 2',
105 | () {
106 | final chordTable = [
107 | ["C", "D"],
108 | ["C#", "D#"],
109 | ["D", "E"],
110 | ["D#", "F"],
111 | ["E", "F#"],
112 | ];
113 | for (var chordPair in chordTable) {
114 | final transposedChord =
115 | ChordTransposer(ChordNotation.american, transpose: 2)
116 | .transposeChord(chordPair[0]);
117 | expect(transposedChord, chordPair[1]);
118 | }
119 | },
120 | );
121 |
122 | test(
123 | 'Can transpose italian chord by 2',
124 | () {
125 | final chordTable = [
126 | ["Do", "Re"],
127 | ["Do#", "Re#"],
128 | ["Re", "Mi"],
129 | ["Mi", "Fa#"],
130 | ["Re#", "Fa"],
131 | ["La#", "Do"],
132 | ];
133 | for (var chordPair in chordTable) {
134 | final transposedChord =
135 | ChordTransposer(ChordNotation.italian, transpose: 2)
136 | .transposeChord(chordPair[0]);
137 | expect(transposedChord, chordPair[1]);
138 | }
139 | },
140 | );
141 | }
142 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_chord/flutter_chord.dart';
3 |
4 | void main() {
5 | runApp(MyApp());
6 | }
7 |
8 | class MyApp extends StatelessWidget {
9 | // This widget is the root of your application.
10 | @override
11 | Widget build(BuildContext context) {
12 | return MaterialApp(
13 | debugShowCheckedModeBanner: false,
14 | title: 'Flutter Chord',
15 | themeMode: ThemeMode.dark,
16 | darkTheme: ThemeData.dark(),
17 | home: HomePage(),
18 | );
19 | }
20 | }
21 |
22 | class HomePage extends StatefulWidget {
23 | const HomePage({Key? key}) : super(key: key);
24 |
25 | @override
26 | _HomePageState createState() => _HomePageState();
27 | }
28 |
29 | class _HomePageState extends State {
30 | final chordStyle = TextStyle(fontSize: 20, color: Colors.green);
31 | final textStyle = TextStyle(fontSize: 18, color: Colors.white);
32 | String _lyrics = '';
33 | int transposeIncrement = 0;
34 | int scrollSpeed = 0;
35 |
36 | @override
37 | Widget build(BuildContext context) {
38 | return Scaffold(
39 | appBar: AppBar(
40 | title: Text('Flutter Chord Example'),
41 | ),
42 | body: Column(
43 | children: [
44 | Expanded(
45 | child: Container(
46 | padding: const EdgeInsets.all(12.0),
47 | color: Colors.teal,
48 | child: TextFormField(
49 | initialValue: _lyrics,
50 | style: textStyle,
51 | maxLines: 50,
52 | onChanged: (value) {
53 | setState(() {
54 | _lyrics = value;
55 | });
56 | },
57 | ),
58 | ),
59 | ),
60 | Divider(),
61 | Row(
62 | mainAxisAlignment: MainAxisAlignment.spaceAround,
63 | children: [
64 | Column(
65 | children: [
66 | Row(
67 | children: [
68 | ElevatedButton(
69 | onPressed: () {
70 | setState(() {
71 | transposeIncrement--;
72 | });
73 | },
74 | child: Text('-'),
75 | ),
76 | SizedBox(width: 5),
77 | Text('$transposeIncrement'),
78 | SizedBox(width: 5),
79 | ElevatedButton(
80 | onPressed: () {
81 | setState(() {
82 | transposeIncrement++;
83 | });
84 | },
85 | child: Text('+'),
86 | ),
87 | ],
88 | ),
89 | Text('Transpose')
90 | ],
91 | ),
92 | Column(
93 | children: [
94 | Row(
95 | children: [
96 | ElevatedButton(
97 | onPressed: scrollSpeed <= 0
98 | ? null
99 | : () {
100 | setState(() {
101 | scrollSpeed--;
102 | });
103 | },
104 | child: Text('-'),
105 | ),
106 | SizedBox(width: 5),
107 | Text('$scrollSpeed'),
108 | SizedBox(width: 5),
109 | ElevatedButton(
110 | onPressed: () {
111 | setState(() {
112 | scrollSpeed++;
113 | });
114 | },
115 | child: Text('+'),
116 | ),
117 | ],
118 | ),
119 | Text('Auto Scroll')
120 | ],
121 | ),
122 | ],
123 | ),
124 | Divider(),
125 | Expanded(
126 | child: Container(
127 | padding: const EdgeInsets.all(12.0),
128 | color: Colors.black,
129 | child: LyricsRenderer(
130 | lyrics: _lyrics,
131 | textStyle: textStyle,
132 | chordStyle: chordStyle,
133 | onTapChord: (String chord) {
134 | print('pressed chord: $chord');
135 | },
136 | transposeIncrement: transposeIncrement,
137 | scrollSpeed: scrollSpeed,
138 | widgetPadding: 24,
139 | lineHeight: 4,
140 | horizontalAlignment: CrossAxisAlignment.start,
141 | leadingWidget: Padding(
142 | padding: const EdgeInsets.symmetric(
143 | vertical: 16,
144 | ),
145 | child: Text(
146 | 'Leading Widget',
147 | style: chordStyle,
148 | ),
149 | ),
150 | trailingWidget: Text(
151 | 'Trailing Widget',
152 | style: chordStyle,
153 | ),
154 | ),
155 | ),
156 | )
157 | ],
158 | ),
159 | );
160 | }
161 |
162 | @override
163 | void initState() {
164 | super.initState();
165 | _lyrics = '''
166 | [C]Give me Freedom, [F]Give me fire
167 | [Am]Give me reason, [G]Take me higher
168 | [C]See the champions [F], Take the field now
169 | [Am]Unify us, [G]make us feel proud
170 |
171 | [C]In the streets our, [F]hands are lifting
172 | [Am]As we lose our, [G]inhibition
173 | [C]Celebration, [F]its around us
174 | [Am]Every nation, [G]all around us
175 | {soc}
176 | [C]Singing forever [F]young,
177 | Singing [Am]songs underneath the sun[G]
178 | Let's [C]rejoice in the beautiful game[F]
179 | And [Am]together, every end of the day[G]
180 | {eoc}
181 | [C]When I get older, [F]I will be stronger
182 | [Am]They'll call me freedom, [G]just like a waving [C]flag
183 | And then it goes [F]back, and then it goes [Am]back
184 | And then it goes [G]back , and then it goes …
185 | {soc}
186 | We all say
187 | [C]When I get older, [F]I will be stronger
188 | [Am]They'll call me freedom, [G]just like a waving [C]flag
189 | And then it goes [F]back, and then it goes [Am]back
190 | And then it goes [G]back , and then it goes …
191 | {eoc}
192 | ''';
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | cupertino_icons:
45 | dependency: "direct main"
46 | description:
47 | name: cupertino_icons
48 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.0.8"
52 | fake_async:
53 | dependency: transitive
54 | description:
55 | name: fake_async
56 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
57 | url: "https://pub.dev"
58 | source: hosted
59 | version: "1.3.1"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_chord:
66 | dependency: "direct main"
67 | description:
68 | path: ".."
69 | relative: true
70 | source: path
71 | version: "0.1.2"
72 | flutter_test:
73 | dependency: "direct dev"
74 | description: flutter
75 | source: sdk
76 | version: "0.0.0"
77 | leak_tracker:
78 | dependency: transitive
79 | description:
80 | name: leak_tracker
81 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
82 | url: "https://pub.dev"
83 | source: hosted
84 | version: "10.0.5"
85 | leak_tracker_flutter_testing:
86 | dependency: transitive
87 | description:
88 | name: leak_tracker_flutter_testing
89 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
90 | url: "https://pub.dev"
91 | source: hosted
92 | version: "3.0.5"
93 | leak_tracker_testing:
94 | dependency: transitive
95 | description:
96 | name: leak_tracker_testing
97 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
98 | url: "https://pub.dev"
99 | source: hosted
100 | version: "3.0.1"
101 | matcher:
102 | dependency: transitive
103 | description:
104 | name: matcher
105 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
106 | url: "https://pub.dev"
107 | source: hosted
108 | version: "0.12.16+1"
109 | material_color_utilities:
110 | dependency: transitive
111 | description:
112 | name: material_color_utilities
113 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
114 | url: "https://pub.dev"
115 | source: hosted
116 | version: "0.11.1"
117 | meta:
118 | dependency: transitive
119 | description:
120 | name: meta
121 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
122 | url: "https://pub.dev"
123 | source: hosted
124 | version: "1.15.0"
125 | path:
126 | dependency: transitive
127 | description:
128 | name: path
129 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
130 | url: "https://pub.dev"
131 | source: hosted
132 | version: "1.9.0"
133 | sky_engine:
134 | dependency: transitive
135 | description: flutter
136 | source: sdk
137 | version: "0.0.99"
138 | source_span:
139 | dependency: transitive
140 | description:
141 | name: source_span
142 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
143 | url: "https://pub.dev"
144 | source: hosted
145 | version: "1.10.0"
146 | stack_trace:
147 | dependency: transitive
148 | description:
149 | name: stack_trace
150 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
151 | url: "https://pub.dev"
152 | source: hosted
153 | version: "1.11.1"
154 | stream_channel:
155 | dependency: transitive
156 | description:
157 | name: stream_channel
158 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
159 | url: "https://pub.dev"
160 | source: hosted
161 | version: "2.1.2"
162 | string_scanner:
163 | dependency: transitive
164 | description:
165 | name: string_scanner
166 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
167 | url: "https://pub.dev"
168 | source: hosted
169 | version: "1.2.0"
170 | term_glyph:
171 | dependency: transitive
172 | description:
173 | name: term_glyph
174 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
175 | url: "https://pub.dev"
176 | source: hosted
177 | version: "1.2.1"
178 | test_api:
179 | dependency: transitive
180 | description:
181 | name: test_api
182 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
183 | url: "https://pub.dev"
184 | source: hosted
185 | version: "0.7.2"
186 | vector_math:
187 | dependency: transitive
188 | description:
189 | name: vector_math
190 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
191 | url: "https://pub.dev"
192 | source: hosted
193 | version: "2.1.4"
194 | vm_service:
195 | dependency: transitive
196 | description:
197 | name: vm_service
198 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
199 | url: "https://pub.dev"
200 | source: hosted
201 | version: "14.2.5"
202 | sdks:
203 | dart: ">=3.3.0 <3.24.4"
204 | flutter: ">=3.18.0-18.0.pre.54"
205 |
--------------------------------------------------------------------------------
/lib/src/chord_parser.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'model/chord_lyrics_document.dart';
5 | import 'model/chord_lyrics_line.dart';
6 | import 'chord_transposer.dart';
7 |
8 | class ChordProcessor {
9 | final BuildContext context;
10 | final ChordNotation chordNotation;
11 | final ChordTransposer chordTransposer;
12 | final double media;
13 | late TextScaler _textScaleFactor;
14 |
15 | ChordProcessor(this.context, [this.chordNotation = ChordNotation.american])
16 | : chordTransposer = ChordTransposer(chordNotation),
17 | media = MediaQuery.of(context).size.width;
18 |
19 | /// Process the text to get the parsed ChordLyricsDocument
20 | ChordLyricsDocument processText({
21 | required String text,
22 | required TextStyle lyricsStyle,
23 | required TextStyle chordStyle,
24 | required TextStyle chorusStyle,
25 | double scaleFactor = 1.0,
26 | int widgetPadding = 0,
27 | int transposeIncrement = 0,
28 | required List breakingCharacters,
29 | }) {
30 | final List lines = text.split('\n');
31 | final MetadataHandler metadata = MetadataHandler();
32 | _textScaleFactor = TextScaler.linear(scaleFactor);
33 | chordTransposer.transpose = transposeIncrement;
34 |
35 | /// List to store our updated lines without overflows
36 | final List newLines = [];
37 | String currentLine = '';
38 |
39 | ///loop through the lines
40 | for (int i = 0; i < lines.length; i++) {
41 | currentLine = lines[i];
42 |
43 | ///If it finds some metadata skip to the next line
44 | if (metadata.parseLine(currentLine)) {
45 | continue;
46 | }
47 |
48 | //check if we have a long line
49 | if (textWidth(currentLine, lyricsStyle) >= media) {
50 | _handleLongLine(
51 | currentLine: currentLine,
52 | newLines: newLines,
53 | lyricsStyle: lyricsStyle,
54 | widgetPadding: widgetPadding,
55 | breakingCharacters: breakingCharacters);
56 | } else {
57 | //otherwise just add the regular line
58 | newLines.add(currentLine.trim());
59 | }
60 | }
61 |
62 | List _chordLyricsLines = newLines
63 | .map(
64 | (line) => _processLine(line, lyricsStyle, chordStyle, chorusStyle))
65 | .toList();
66 |
67 | return ChordLyricsDocument(_chordLyricsLines,
68 | capo: metadata.capo,
69 | artist: metadata.artist,
70 | title: metadata.title,
71 | key: metadata.key);
72 | }
73 |
74 | void _handleLongLine(
75 | {required List newLines,
76 | required String currentLine,
77 | required TextStyle lyricsStyle,
78 | required int widgetPadding,
79 | required List breakingCharacters}) {
80 | String _character = '';
81 | int _characterIndex = 0;
82 | String _currentCharacters = '';
83 | bool _chordHasStartedOuter = false;
84 | int _lastSpace = 0;
85 | List _breakCharacters = breakingCharacters;
86 |
87 | //print('found a big line $currentLine');
88 |
89 | //work our way through the line and split when we need to
90 | for (var j = 0; j < currentLine.length; j++) {
91 | _character = currentLine[j];
92 | if (_character == '[') {
93 | _chordHasStartedOuter = true;
94 | } else if (_character == ']') {
95 | _chordHasStartedOuter = false;
96 | } else if (!_chordHasStartedOuter) {
97 | _currentCharacters += _character;
98 | if (_breakCharacters.contains(_character)) {
99 | //use this marker to only split where there are breaks. We can trim later.
100 | _lastSpace = j + 1;
101 | }
102 |
103 | //This is the point where we need to split
104 | //widgetPadding has been added as a parameter to be passed from the build function
105 | //It is intended to allow for padding in the widget when comparing it to screen width
106 | //An additional buffer of around 10 might be needed to definitely stop overflow (ie. padding + 10).
107 | if (textWidth(_currentCharacters, lyricsStyle) + widgetPadding >=
108 | media) {
109 | newLines
110 | .add(currentLine.substring(_characterIndex, _lastSpace).trim());
111 | _currentCharacters = '';
112 | _characterIndex = _lastSpace;
113 | }
114 | }
115 | }
116 | //add the rest of the long line
117 | newLines
118 | .add(currentLine.substring(_characterIndex, currentLine.length).trim());
119 | }
120 |
121 | /// Return the textwidth of the text in the given style
122 | double textWidth(String text, TextStyle textStyle) {
123 | return (TextPainter(
124 | textScaler: _textScaleFactor,
125 | text: TextSpan(text: text, style: textStyle),
126 | maxLines: 1,
127 | textDirection: TextDirection.ltr,
128 | )..layout())
129 | .size
130 | .width;
131 | }
132 |
133 | bool isChorus = false;
134 | ChordLyricsLine _processLine(String line, TextStyle lyricsStyle,
135 | TextStyle chordStyle, TextStyle chorusStyle) {
136 | ChordLyricsLine _chordLyricsLine = ChordLyricsLine();
137 | String _lyricsSoFar = '';
138 | String _chordsSoFar = '';
139 | bool _chordHasStarted = false;
140 | if (line.contains("{soc}") || line.contains("{start_of_chorus}")) {
141 | isChorus = true;
142 | } else if (line.contains("{eoc}") || line.contains("{end_of_chorus}")) {
143 | isChorus = false;
144 | }
145 | line.split('').forEach((character) {
146 | if (character == ']') {
147 | final sizeOfLeadingLyrics = isChorus
148 | ? textWidth(_lyricsSoFar, chorusStyle)
149 | : textWidth(_lyricsSoFar, lyricsStyle);
150 |
151 | final lastChordText = _chordLyricsLine.chords.isNotEmpty
152 | ? _chordLyricsLine.chords.last.chordText
153 | : '';
154 |
155 | final lastChordWidth = textWidth(lastChordText, chordStyle);
156 | // final sizeOfThisChord = textWidth(_chordsSoFar, chordStyle);
157 |
158 | double leadingSpace = max(0, sizeOfLeadingLyrics - lastChordWidth);
159 |
160 | final transposedChord = chordTransposer.transposeChord(_chordsSoFar);
161 |
162 | _chordLyricsLine.chords.add(Chord(leadingSpace, transposedChord));
163 | _chordLyricsLine.lyrics += _lyricsSoFar;
164 | _lyricsSoFar = '';
165 | _chordsSoFar = '';
166 | _chordHasStarted = false;
167 | } else if (character == '[') {
168 | _chordHasStarted = true;
169 | } else {
170 | if (_chordHasStarted) {
171 | _chordsSoFar += character;
172 | } else {
173 | _lyricsSoFar += character;
174 | }
175 | }
176 | });
177 |
178 | _chordLyricsLine.lyrics += _lyricsSoFar;
179 |
180 | return _chordLyricsLine;
181 | }
182 | }
183 |
184 | class MetadataHandler {
185 | /// As specifications says "meta data is specified using “tags” surrounded by { and } characters"
186 | final RegExp regMetadata = RegExp(r'^ *\{.*}');
187 | final RegExp regCapo = RegExp(r'^\{capo:.*[0-9]+\}');
188 | final RegExp regArtist = RegExp(r'^\{artist:.*\}');
189 | final RegExp regTitle = RegExp(r'^\{title:.*\}');
190 | final RegExp regKey = RegExp(r'^\{key:.*\}');
191 | int? capo;
192 | String? artist;
193 | String? title;
194 | String? key;
195 |
196 | /// Try to find and parse metadata in the string.
197 | /// Return true if there was a match
198 | bool parseLine(String line) {
199 | return _setCapoIfMatch(line) ||
200 | _setArtistIfMatch(line) ||
201 | _setKeyIfMatch(line) ||
202 | _setTitleIfMatch(line);
203 | }
204 |
205 | /// Get key in line if it's present
206 | /// Return true if match was found
207 | bool _setKeyIfMatch(String line) {
208 | String? tmpKey =
209 | regKey.hasMatch(line) ? _getMetadataFromLine(line, 'key:') : null;
210 | key ??= tmpKey;
211 | return tmpKey != null;
212 | }
213 |
214 | /// Get capo in line if it's present
215 | /// Return true if match was found
216 | bool _setCapoIfMatch(String line) {
217 | int? tmpCapo = regCapo.hasMatch(line)
218 | ? int.parse(_getMetadataFromLine(line, 'capo:'))
219 | : null;
220 | capo ??= tmpCapo;
221 | return tmpCapo != null;
222 | }
223 |
224 | /// Get artist in line if it's present
225 | /// Return true if match was found
226 | bool _setArtistIfMatch(String line) {
227 | String? tmpArtist =
228 | regArtist.hasMatch(line) ? _getMetadataFromLine(line, 'artist:') : null;
229 | artist ??= tmpArtist;
230 | return tmpArtist != null;
231 | }
232 |
233 | /// Get title in line if it's present
234 | /// Return true if match was found
235 | bool _setTitleIfMatch(String line) {
236 | String? tmpTitle =
237 | regTitle.hasMatch(line) ? _getMetadataFromLine(line, 'title:') : null;
238 | title ??= tmpTitle;
239 | return tmpTitle != null;
240 | }
241 |
242 | String _getMetadataFromLine(String line, String key) {
243 | return line.split(key).last.split('}').first.trim();
244 | }
245 | }
246 |
--------------------------------------------------------------------------------
/lib/src/lyrics_renderer.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'chord_transposer.dart';
3 | import 'model/chord_lyrics_line.dart';
4 | import 'chord_parser.dart';
5 |
6 | class LyricsRenderer extends StatefulWidget {
7 | final String lyrics;
8 | final TextStyle textStyle;
9 | final TextStyle chordStyle;
10 | final bool showChord;
11 | final Function onTapChord;
12 |
13 | /// To help stop overflow, this should be the sum of left & right padding
14 | final int widgetPadding;
15 |
16 | /// Transpose Increment for the Chords,
17 | /// default value is 0, which means no transpose is applied
18 | final int transposeIncrement;
19 |
20 | /// Auto Scroll Speed,
21 | /// default value is 0, which means no auto scroll is applied
22 | final int scrollSpeed;
23 |
24 | /// Extra height between each line
25 | final double lineHeight;
26 |
27 | /// Widget before the lyrics starts
28 | final Widget? leadingWidget;
29 |
30 | /// Widget after the lyrics finishes
31 | final Widget? trailingWidget;
32 |
33 | /// Horizontal alignment
34 | final CrossAxisAlignment horizontalAlignment;
35 |
36 | /// Scale factor of chords and lyrics
37 | final double scaleFactor;
38 |
39 | /// Notation that will be handled by the transposer
40 | final ChordNotation chordNotation;
41 |
42 | /// Define physics of scrolling
43 | final ScrollPhysics scrollPhysics;
44 |
45 | /// If not defined it will be the bold version of [textStyle]
46 | final TextStyle? chorusStyle;
47 |
48 | /// If not defined it will be the italic version of [textStyle]
49 | final TextStyle? capoStyle;
50 |
51 | /// If not defined it will be the italic version of [textStyle]
52 | final TextStyle? commentStyle;
53 |
54 | /// Optional external scroll controller, otherwise will be created internally
55 | final ScrollController? scrollController;
56 |
57 | /// List of characters that will break the line
58 | final List breakingCharacters;
59 |
60 | const LyricsRenderer(
61 | {Key? key,
62 | required this.lyrics,
63 | required this.textStyle,
64 | required this.chordStyle,
65 | required this.onTapChord,
66 | this.chorusStyle,
67 | this.commentStyle,
68 | this.capoStyle,
69 | this.scaleFactor = 1.0,
70 | this.showChord = true,
71 | this.widgetPadding = 0,
72 | this.transposeIncrement = 0,
73 | this.scrollSpeed = 0,
74 | this.lineHeight = 8.0,
75 | this.horizontalAlignment = CrossAxisAlignment.center,
76 | this.scrollPhysics = const ClampingScrollPhysics(),
77 | this.leadingWidget,
78 | this.trailingWidget,
79 | this.chordNotation = ChordNotation.american,
80 | this.scrollController,
81 | this.breakingCharacters = const [' ', ',', '.', '。', '、']})
82 | : super(key: key);
83 |
84 | @override
85 | State createState() => _LyricsRendererState();
86 | }
87 |
88 | class _LyricsRendererState extends State {
89 | late final ScrollController _controller;
90 | late TextStyle chorusStyle;
91 | late TextStyle capoStyle;
92 | late TextStyle commentStyle;
93 | bool _isChorus = false;
94 | bool _isComment = false;
95 |
96 | @override
97 | void initState() {
98 | super.initState();
99 | chorusStyle = widget.chorusStyle ??
100 | widget.textStyle.copyWith(fontWeight: FontWeight.bold);
101 | capoStyle = widget.capoStyle ??
102 | widget.textStyle.copyWith(fontStyle: FontStyle.italic);
103 | commentStyle = widget.commentStyle ??
104 | widget.textStyle.copyWith(
105 | fontStyle: FontStyle.italic,
106 | fontSize: widget.textStyle.fontSize! - 2,
107 | );
108 | _controller = widget.scrollController ?? ScrollController();
109 | WidgetsBinding.instance.addPostFrameCallback((_) {
110 | // executes after build
111 | _scrollToEnd();
112 | });
113 | }
114 |
115 | @override
116 | void dispose() {
117 | _controller.dispose();
118 | super.dispose();
119 | }
120 |
121 | TextStyle getLineTextStyle() {
122 | if (_isChorus) {
123 | return chorusStyle;
124 | } else if (_isComment) {
125 | return commentStyle;
126 | } else {
127 | return widget.textStyle;
128 | }
129 | }
130 |
131 | @override
132 | Widget build(BuildContext context) {
133 | ChordProcessor _chordProcessor =
134 | ChordProcessor(context, widget.chordNotation);
135 | final chordLyricsDocument = _chordProcessor.processText(
136 | text: widget.lyrics,
137 | lyricsStyle: widget.textStyle,
138 | chordStyle: widget.chordStyle,
139 | chorusStyle: chorusStyle,
140 | widgetPadding: widget.widgetPadding,
141 | scaleFactor: widget.scaleFactor,
142 | transposeIncrement: widget.transposeIncrement,
143 | breakingCharacters: widget.breakingCharacters,
144 | );
145 | if (chordLyricsDocument.chordLyricsLines.isEmpty) return Container();
146 | return SingleChildScrollView(
147 | controller: _controller,
148 | physics: widget.scrollPhysics,
149 | child: Column(
150 | crossAxisAlignment: widget.horizontalAlignment,
151 | children: [
152 | if (widget.leadingWidget != null) widget.leadingWidget!,
153 | if (chordLyricsDocument.capo != null)
154 | Text('Capo: ${chordLyricsDocument.capo!}', style: capoStyle),
155 | ListView.separated(
156 | shrinkWrap: true,
157 | scrollDirection: Axis.vertical,
158 | physics: const NeverScrollableScrollPhysics(),
159 | separatorBuilder: (context, index) => SizedBox(
160 | height: widget.lineHeight,
161 | ),
162 | itemBuilder: (context, index) {
163 | final ChordLyricsLine line =
164 | chordLyricsDocument.chordLyricsLines[index];
165 | if (line.isStartOfChorus()) {
166 | _isChorus = true;
167 | }
168 | if (line.isEndOfChorus()) {
169 | _isChorus = false;
170 | }
171 | if (line.isComment()) {
172 | _isComment = true;
173 | } else {
174 | _isComment = false;
175 | }
176 | return Column(
177 | crossAxisAlignment: CrossAxisAlignment.start,
178 | children: [
179 | if (widget.showChord)
180 | Row(
181 | children: line.chords
182 | .map((chord) => Row(
183 | children: [
184 | SizedBox(
185 | width: chord.leadingSpace,
186 | ),
187 | GestureDetector(
188 | onTap: () =>
189 | widget.onTapChord(chord.chordText),
190 | child: RichText(
191 | text: TextSpan(
192 | text: chord.chordText,
193 | style: widget.chordStyle,
194 | ),
195 | textScaler:
196 | TextScaler.linear(widget.scaleFactor),
197 | ),
198 | )
199 | ],
200 | ))
201 | .toList(),
202 | ),
203 | RichText(
204 | text:
205 | TextSpan(text: line.lyrics, style: getLineTextStyle()),
206 | textScaler: TextScaler.linear(widget.scaleFactor),
207 | )
208 | ],
209 | );
210 | },
211 | itemCount: chordLyricsDocument.chordLyricsLines.length,
212 | ),
213 | if (widget.trailingWidget != null) widget.trailingWidget!,
214 | ],
215 | ),
216 | );
217 | }
218 |
219 | @override
220 | void didUpdateWidget(covariant LyricsRenderer oldWidget) {
221 | super.didUpdateWidget(oldWidget);
222 | if (oldWidget.scrollSpeed != widget.scrollSpeed) {
223 | _scrollToEnd();
224 | }
225 | }
226 |
227 | void _scrollToEnd() {
228 | if (widget.scrollSpeed <= 0) {
229 | // stop scrolling if the speed is 0 or less
230 | _controller.jumpTo(_controller.offset);
231 | return;
232 | }
233 |
234 | if (_controller.offset >= _controller.position.maxScrollExtent) return;
235 |
236 | final seconds =
237 | (_controller.position.maxScrollExtent / (widget.scrollSpeed)).floor();
238 |
239 | _controller.animateTo(
240 | _controller.position.maxScrollExtent,
241 | duration: Duration(
242 | seconds: seconds,
243 | ),
244 | curve: Curves.linear,
245 | );
246 | }
247 | }
248 |
249 | class TextRender extends CustomPainter {
250 | final String text;
251 | final TextStyle style;
252 | TextRender(this.text, this.style);
253 |
254 | @override
255 | void paint(Canvas canvas, Size size) {
256 | final textSpan = TextSpan(
257 | text: text,
258 | style: style,
259 | );
260 | final textPainter = TextPainter(
261 | text: textSpan,
262 | textDirection: TextDirection.ltr,
263 | );
264 | textPainter.layout(
265 | minWidth: 0,
266 | maxWidth: size.width,
267 | );
268 | textPainter.paint(canvas, Offset.zero);
269 | }
270 |
271 | @override
272 | bool shouldRepaint(covariant CustomPainter oldDelegate) {
273 | return false;
274 | }
275 | }
276 |
--------------------------------------------------------------------------------
/test/chord_processor_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_chord/flutter_chord.dart';
3 | import 'package:flutter_test/flutter_test.dart';
4 |
5 | void main() {
6 | testWidgets('Can parse single line chord', (WidgetTester tester) async {
7 | await tester.pumpWidget(
8 | MaterialApp(
9 | builder: (context, _) {
10 | String text = '[C]This is t[D]he lyrics[E]';
11 | final textStyle = TextStyle(fontSize: 18, color: Colors.green);
12 |
13 | final processor = ChordProcessor(context);
14 | final chordDocument = processor.processText(
15 | text: text,
16 | lyricsStyle: textStyle,
17 | chordStyle: textStyle,
18 | chorusStyle: textStyle,
19 | breakingCharacters: [' '],
20 | );
21 |
22 | expect(
23 | chordDocument.chordLyricsLines.length,
24 | 1,
25 | );
26 | expect(
27 | chordDocument.chordLyricsLines.first.chords.length,
28 | 3,
29 | );
30 | expect(
31 | chordDocument.chordLyricsLines.first.chords.first.chordText,
32 | 'C',
33 | );
34 | expect(
35 | chordDocument.chordLyricsLines.first.chords.first.leadingSpace,
36 | 0.0,
37 | );
38 |
39 | expect(
40 | chordDocument.chordLyricsLines.first.chords[1].chordText,
41 | 'D',
42 | );
43 |
44 | final textWidth = processor.textWidth('This is t', textStyle);
45 | final chordWidth = processor.textWidth('C', textStyle);
46 | expect(
47 | chordDocument.chordLyricsLines.first.chords[1].leadingSpace,
48 | textWidth - chordWidth,
49 | );
50 |
51 | // The builder function must return a widget.
52 | return Container();
53 | },
54 | ),
55 | );
56 | });
57 |
58 | testWidgets('Can parse multiple lines lyrics', (WidgetTester tester) async {
59 | await tester.pumpWidget(
60 | MaterialApp(
61 | builder: (context, _) {
62 | String text =
63 | '{soc}\n[C]This is t[D]he Cho[D]rus\n{eoc}\n[C]This is t[D]he lyrics[E]\n[A]This is t[D]he se[B]cond line[E]';
64 | final textStyle = TextStyle(fontSize: 18, color: Colors.green);
65 | final chorusStyle = TextStyle(
66 | fontSize: 21, fontWeight: FontWeight.bold, color: Colors.white);
67 |
68 | final processor = ChordProcessor(context);
69 | final chordDocument = processor.processText(
70 | text: text,
71 | lyricsStyle: textStyle,
72 | chordStyle: textStyle,
73 | chorusStyle: chorusStyle,
74 | breakingCharacters: [' '],
75 | );
76 |
77 | expect(
78 | chordDocument.chordLyricsLines.length,
79 | 5,
80 | );
81 | expect(
82 | chordDocument.chordLyricsLines.last.chords.length,
83 | 4,
84 | );
85 | expect(
86 | chordDocument.chordLyricsLines.last.chords.last.chordText,
87 | 'E',
88 | );
89 | expect(
90 | chordDocument.chordLyricsLines[1].chords.first.leadingSpace,
91 | 0.0,
92 | );
93 | expect(
94 | chordDocument.chordLyricsLines[1].chords[1].chordText,
95 | 'D',
96 | );
97 |
98 | final textWidth = processor.textWidth('This is t', textStyle);
99 | final chordWidth = processor.textWidth('C', textStyle);
100 | expect(
101 | chordDocument.chordLyricsLines[3].chords[1].leadingSpace,
102 | textWidth - chordWidth,
103 | );
104 |
105 | final chorusTextWidth = processor.textWidth('This is t', chorusStyle);
106 | final chorusChordWidth = processor.textWidth('C', textStyle);
107 | expect(
108 | chordDocument.chordLyricsLines[1].chords[1].leadingSpace,
109 | chorusTextWidth - chorusChordWidth,
110 | ); // The builder function must return a widget.
111 | return Container();
112 | },
113 | ),
114 | );
115 | });
116 |
117 | testWidgets('Can parse title, artist and capo lines in lyrics',
118 | (WidgetTester tester) async {
119 | await tester.pumpWidget(
120 | MaterialApp(
121 | builder: (context, _) {
122 | String text =
123 | '{capo: 3}\n{title: Test title}\n{artist: artist test}\n[C]This is t[D]he lyrics[E]\n[A]This is t[D]he se[B]cond line[E]';
124 | final textStyle = TextStyle(fontSize: 18, color: Colors.green);
125 |
126 | final processor = ChordProcessor(context);
127 | final chordDocument = processor.processText(
128 | text: text,
129 | lyricsStyle: textStyle,
130 | chordStyle: textStyle,
131 | chorusStyle: textStyle,
132 | breakingCharacters: [' '],
133 | );
134 |
135 | expect(chordDocument.capo, 3);
136 | expect(chordDocument.artist, 'artist test');
137 | expect(chordDocument.title, 'Test title');
138 |
139 | expect(
140 | chordDocument.chordLyricsLines.length,
141 | 2,
142 | );
143 | expect(
144 | chordDocument.chordLyricsLines.last.chords.length,
145 | 4,
146 | );
147 | expect(
148 | chordDocument.chordLyricsLines.last.chords.last.chordText,
149 | 'E',
150 | );
151 | expect(
152 | chordDocument.chordLyricsLines.first.chords.first.leadingSpace,
153 | 0.0,
154 | );
155 |
156 | expect(
157 | chordDocument.chordLyricsLines.first.chords[1].chordText,
158 | 'D',
159 | );
160 |
161 | final textWidth = processor.textWidth('This is t', textStyle);
162 | final chordWidth = processor.textWidth('C', textStyle);
163 | expect(
164 | chordDocument.chordLyricsLines.first.chords[1].leadingSpace,
165 | textWidth - chordWidth,
166 | );
167 |
168 | // The builder function must return a widget.
169 | return Container();
170 | },
171 | ),
172 | );
173 | });
174 |
175 | testWidgets('Can split long lyrics into multiple lines',
176 | (WidgetTester tester) async {
177 | await tester.pumpWidget(
178 | MaterialApp(
179 | builder: (context, _) {
180 | String text =
181 | '[C]This is t[D]he lyrics[E] [A]This is t[D]he se[B]cond line[E] This [A]makes it [G]overflow';
182 | final textStyle = TextStyle(fontSize: 18, color: Colors.green);
183 |
184 | final processor = ChordProcessor(context);
185 | final chordDocument = processor.processText(
186 | text: text,
187 | lyricsStyle: textStyle,
188 | chordStyle: textStyle,
189 | chorusStyle: textStyle,
190 | breakingCharacters: [' '],
191 | );
192 |
193 | expect(
194 | chordDocument.chordLyricsLines.length,
195 | 2,
196 | );
197 | expect(
198 | chordDocument.chordLyricsLines.first.chords.length,
199 | 7,
200 | );
201 | expect(
202 | chordDocument.chordLyricsLines.last.lyrics,
203 | 'This makes it overflow',
204 | );
205 | expect(
206 | chordDocument.chordLyricsLines.first.chords.first.leadingSpace,
207 | 0.0,
208 | );
209 |
210 | expect(
211 | chordDocument.chordLyricsLines.first.chords.last.chordText,
212 | 'E',
213 | );
214 |
215 | expect(
216 | chordDocument.chordLyricsLines.last.chords.first.chordText,
217 | 'A',
218 | );
219 |
220 | // The builder function must return a widget.
221 | return Container();
222 | },
223 | ),
224 | );
225 | });
226 |
227 | testWidgets('Can split lyrics based on custom break',
228 | (WidgetTester tester) async {
229 | await tester.pumpWidget(
230 | MaterialApp(
231 | builder: (context, _) {
232 | String text =
233 | '[C]もーもたろさんももたろさん、おこしにつけた[D]…[C]もーもたろさんももたろさん、おこしにつけた[D]…';
234 | final textStyle = TextStyle(fontSize: 22, color: Colors.green);
235 |
236 | final processor = ChordProcessor(context);
237 | final chordDocument = processor.processText(
238 | text: text,
239 | lyricsStyle: textStyle,
240 | chordStyle: textStyle,
241 | chorusStyle: textStyle,
242 | breakingCharacters: ['、', '…'],
243 | );
244 |
245 | expect(
246 | chordDocument.chordLyricsLines.length,
247 | 2,
248 | );
249 | expect(
250 | chordDocument.chordLyricsLines.first.chords.length,
251 | 3,
252 | );
253 | expect(
254 | chordDocument.chordLyricsLines.last.lyrics,
255 | 'おこしにつけた…',
256 | );
257 | expect(
258 | chordDocument.chordLyricsLines.first.chords.first.leadingSpace,
259 | 0.0,
260 | );
261 |
262 | expect(
263 | chordDocument.chordLyricsLines.first.chords.last.chordText,
264 | 'C',
265 | );
266 |
267 | expect(
268 | chordDocument.chordLyricsLines.last.chords.first.chordText,
269 | 'D',
270 | );
271 |
272 | // The builder function must return a widget.
273 | return Container();
274 | },
275 | ),
276 | );
277 | });
278 | }
279 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | _fe_analyzer_shared:
5 | dependency: transitive
6 | description:
7 | name: _fe_analyzer_shared
8 | sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "72.0.0"
12 | _macros:
13 | dependency: transitive
14 | description: dart
15 | source: sdk
16 | version: "0.3.2"
17 | analyzer:
18 | dependency: transitive
19 | description:
20 | name: analyzer
21 | sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
22 | url: "https://pub.dev"
23 | source: hosted
24 | version: "6.7.0"
25 | args:
26 | dependency: transitive
27 | description:
28 | name: args
29 | sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
30 | url: "https://pub.dev"
31 | source: hosted
32 | version: "2.6.0"
33 | async:
34 | dependency: transitive
35 | description:
36 | name: async
37 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
38 | url: "https://pub.dev"
39 | source: hosted
40 | version: "2.11.0"
41 | boolean_selector:
42 | dependency: transitive
43 | description:
44 | name: boolean_selector
45 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
46 | url: "https://pub.dev"
47 | source: hosted
48 | version: "2.1.1"
49 | build:
50 | dependency: transitive
51 | description:
52 | name: build
53 | sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
54 | url: "https://pub.dev"
55 | source: hosted
56 | version: "2.4.1"
57 | built_collection:
58 | dependency: transitive
59 | description:
60 | name: built_collection
61 | sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
62 | url: "https://pub.dev"
63 | source: hosted
64 | version: "5.1.1"
65 | built_value:
66 | dependency: transitive
67 | description:
68 | name: built_value
69 | sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb
70 | url: "https://pub.dev"
71 | source: hosted
72 | version: "8.9.2"
73 | characters:
74 | dependency: transitive
75 | description:
76 | name: characters
77 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
78 | url: "https://pub.dev"
79 | source: hosted
80 | version: "1.3.0"
81 | clock:
82 | dependency: transitive
83 | description:
84 | name: clock
85 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
86 | url: "https://pub.dev"
87 | source: hosted
88 | version: "1.1.1"
89 | code_builder:
90 | dependency: transitive
91 | description:
92 | name: code_builder
93 | sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e"
94 | url: "https://pub.dev"
95 | source: hosted
96 | version: "4.10.1"
97 | collection:
98 | dependency: transitive
99 | description:
100 | name: collection
101 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
102 | url: "https://pub.dev"
103 | source: hosted
104 | version: "1.18.0"
105 | convert:
106 | dependency: transitive
107 | description:
108 | name: convert
109 | sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
110 | url: "https://pub.dev"
111 | source: hosted
112 | version: "3.1.2"
113 | crypto:
114 | dependency: transitive
115 | description:
116 | name: crypto
117 | sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
118 | url: "https://pub.dev"
119 | source: hosted
120 | version: "3.0.6"
121 | dart_style:
122 | dependency: transitive
123 | description:
124 | name: dart_style
125 | sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
126 | url: "https://pub.dev"
127 | source: hosted
128 | version: "2.3.7"
129 | fake_async:
130 | dependency: transitive
131 | description:
132 | name: fake_async
133 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
134 | url: "https://pub.dev"
135 | source: hosted
136 | version: "1.3.1"
137 | file:
138 | dependency: transitive
139 | description:
140 | name: file
141 | sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
142 | url: "https://pub.dev"
143 | source: hosted
144 | version: "7.0.1"
145 | fixnum:
146 | dependency: transitive
147 | description:
148 | name: fixnum
149 | sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
150 | url: "https://pub.dev"
151 | source: hosted
152 | version: "1.1.1"
153 | flutter:
154 | dependency: "direct main"
155 | description: flutter
156 | source: sdk
157 | version: "0.0.0"
158 | flutter_test:
159 | dependency: "direct dev"
160 | description: flutter
161 | source: sdk
162 | version: "0.0.0"
163 | glob:
164 | dependency: transitive
165 | description:
166 | name: glob
167 | sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "2.1.2"
171 | leak_tracker:
172 | dependency: transitive
173 | description:
174 | name: leak_tracker
175 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
176 | url: "https://pub.dev"
177 | source: hosted
178 | version: "10.0.5"
179 | leak_tracker_flutter_testing:
180 | dependency: transitive
181 | description:
182 | name: leak_tracker_flutter_testing
183 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
184 | url: "https://pub.dev"
185 | source: hosted
186 | version: "3.0.5"
187 | leak_tracker_testing:
188 | dependency: transitive
189 | description:
190 | name: leak_tracker_testing
191 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
192 | url: "https://pub.dev"
193 | source: hosted
194 | version: "3.0.1"
195 | logging:
196 | dependency: transitive
197 | description:
198 | name: logging
199 | sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
200 | url: "https://pub.dev"
201 | source: hosted
202 | version: "1.3.0"
203 | macros:
204 | dependency: transitive
205 | description:
206 | name: macros
207 | sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
208 | url: "https://pub.dev"
209 | source: hosted
210 | version: "0.1.2-main.4"
211 | matcher:
212 | dependency: transitive
213 | description:
214 | name: matcher
215 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
216 | url: "https://pub.dev"
217 | source: hosted
218 | version: "0.12.16+1"
219 | material_color_utilities:
220 | dependency: transitive
221 | description:
222 | name: material_color_utilities
223 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
224 | url: "https://pub.dev"
225 | source: hosted
226 | version: "0.11.1"
227 | meta:
228 | dependency: transitive
229 | description:
230 | name: meta
231 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
232 | url: "https://pub.dev"
233 | source: hosted
234 | version: "1.15.0"
235 | mockito:
236 | dependency: "direct dev"
237 | description:
238 | name: mockito
239 | sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917"
240 | url: "https://pub.dev"
241 | source: hosted
242 | version: "5.4.4"
243 | package_config:
244 | dependency: transitive
245 | description:
246 | name: package_config
247 | sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
248 | url: "https://pub.dev"
249 | source: hosted
250 | version: "2.1.0"
251 | path:
252 | dependency: transitive
253 | description:
254 | name: path
255 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
256 | url: "https://pub.dev"
257 | source: hosted
258 | version: "1.9.0"
259 | pub_semver:
260 | dependency: transitive
261 | description:
262 | name: pub_semver
263 | sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
264 | url: "https://pub.dev"
265 | source: hosted
266 | version: "2.1.4"
267 | sky_engine:
268 | dependency: transitive
269 | description: flutter
270 | source: sdk
271 | version: "0.0.99"
272 | source_gen:
273 | dependency: transitive
274 | description:
275 | name: source_gen
276 | sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
277 | url: "https://pub.dev"
278 | source: hosted
279 | version: "1.5.0"
280 | source_span:
281 | dependency: transitive
282 | description:
283 | name: source_span
284 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
285 | url: "https://pub.dev"
286 | source: hosted
287 | version: "1.10.0"
288 | stack_trace:
289 | dependency: transitive
290 | description:
291 | name: stack_trace
292 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
293 | url: "https://pub.dev"
294 | source: hosted
295 | version: "1.11.1"
296 | stream_channel:
297 | dependency: transitive
298 | description:
299 | name: stream_channel
300 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
301 | url: "https://pub.dev"
302 | source: hosted
303 | version: "2.1.2"
304 | string_scanner:
305 | dependency: transitive
306 | description:
307 | name: string_scanner
308 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
309 | url: "https://pub.dev"
310 | source: hosted
311 | version: "1.2.0"
312 | term_glyph:
313 | dependency: transitive
314 | description:
315 | name: term_glyph
316 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
317 | url: "https://pub.dev"
318 | source: hosted
319 | version: "1.2.1"
320 | test_api:
321 | dependency: transitive
322 | description:
323 | name: test_api
324 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
325 | url: "https://pub.dev"
326 | source: hosted
327 | version: "0.7.2"
328 | typed_data:
329 | dependency: transitive
330 | description:
331 | name: typed_data
332 | sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
333 | url: "https://pub.dev"
334 | source: hosted
335 | version: "1.4.0"
336 | vector_math:
337 | dependency: transitive
338 | description:
339 | name: vector_math
340 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
341 | url: "https://pub.dev"
342 | source: hosted
343 | version: "2.1.4"
344 | vm_service:
345 | dependency: transitive
346 | description:
347 | name: vm_service
348 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
349 | url: "https://pub.dev"
350 | source: hosted
351 | version: "14.2.5"
352 | watcher:
353 | dependency: transitive
354 | description:
355 | name: watcher
356 | sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
357 | url: "https://pub.dev"
358 | source: hosted
359 | version: "1.1.0"
360 | yaml:
361 | dependency: transitive
362 | description:
363 | name: yaml
364 | sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
365 | url: "https://pub.dev"
366 | source: hosted
367 | version: "3.1.2"
368 | sdks:
369 | dart: ">=3.5.0 <3.24.4"
370 | flutter: ">=3.18.0-18.0.pre.54"
371 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1430;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | alwaysOutOfDate = 1;
175 | buildActionMask = 2147483647;
176 | files = (
177 | );
178 | inputPaths = (
179 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
180 | );
181 | name = "Thin Binary";
182 | outputPaths = (
183 | );
184 | runOnlyForDeploymentPostprocessing = 0;
185 | shellPath = /bin/sh;
186 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
187 | };
188 | 9740EEB61CF901F6004384FC /* Run Script */ = {
189 | isa = PBXShellScriptBuildPhase;
190 | alwaysOutOfDate = 1;
191 | buildActionMask = 2147483647;
192 | files = (
193 | );
194 | inputPaths = (
195 | );
196 | name = "Run Script";
197 | outputPaths = (
198 | );
199 | runOnlyForDeploymentPostprocessing = 0;
200 | shellPath = /bin/sh;
201 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
202 | };
203 | /* End PBXShellScriptBuildPhase section */
204 |
205 | /* Begin PBXSourcesBuildPhase section */
206 | 97C146EA1CF9000F007C117D /* Sources */ = {
207 | isa = PBXSourcesBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
211 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
212 | );
213 | runOnlyForDeploymentPostprocessing = 0;
214 | };
215 | /* End PBXSourcesBuildPhase section */
216 |
217 | /* Begin PBXVariantGroup section */
218 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
219 | isa = PBXVariantGroup;
220 | children = (
221 | 97C146FB1CF9000F007C117D /* Base */,
222 | );
223 | name = Main.storyboard;
224 | sourceTree = "";
225 | };
226 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
227 | isa = PBXVariantGroup;
228 | children = (
229 | 97C147001CF9000F007C117D /* Base */,
230 | );
231 | name = LaunchScreen.storyboard;
232 | sourceTree = "";
233 | };
234 | /* End PBXVariantGroup section */
235 |
236 | /* Begin XCBuildConfiguration section */
237 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
238 | isa = XCBuildConfiguration;
239 | buildSettings = {
240 | ALWAYS_SEARCH_USER_PATHS = NO;
241 | CLANG_ANALYZER_NONNULL = YES;
242 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
243 | CLANG_CXX_LIBRARY = "libc++";
244 | CLANG_ENABLE_MODULES = YES;
245 | CLANG_ENABLE_OBJC_ARC = YES;
246 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
247 | CLANG_WARN_BOOL_CONVERSION = YES;
248 | CLANG_WARN_COMMA = YES;
249 | CLANG_WARN_CONSTANT_CONVERSION = YES;
250 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
252 | CLANG_WARN_EMPTY_BODY = YES;
253 | CLANG_WARN_ENUM_CONVERSION = YES;
254 | CLANG_WARN_INFINITE_RECURSION = YES;
255 | CLANG_WARN_INT_CONVERSION = YES;
256 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
257 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
258 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
259 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
260 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
261 | CLANG_WARN_STRICT_PROTOTYPES = YES;
262 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
263 | CLANG_WARN_UNREACHABLE_CODE = YES;
264 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
265 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
266 | COPY_PHASE_STRIP = NO;
267 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
268 | ENABLE_NS_ASSERTIONS = NO;
269 | ENABLE_STRICT_OBJC_MSGSEND = YES;
270 | GCC_C_LANGUAGE_STANDARD = gnu99;
271 | GCC_NO_COMMON_BLOCKS = YES;
272 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
273 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
274 | GCC_WARN_UNDECLARED_SELECTOR = YES;
275 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
276 | GCC_WARN_UNUSED_FUNCTION = YES;
277 | GCC_WARN_UNUSED_VARIABLE = YES;
278 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
279 | MTL_ENABLE_DEBUG_INFO = NO;
280 | SDKROOT = iphoneos;
281 | SUPPORTED_PLATFORMS = iphoneos;
282 | TARGETED_DEVICE_FAMILY = "1,2";
283 | VALIDATE_PRODUCT = YES;
284 | };
285 | name = Profile;
286 | };
287 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
288 | isa = XCBuildConfiguration;
289 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
290 | buildSettings = {
291 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
292 | CLANG_ENABLE_MODULES = YES;
293 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
294 | ENABLE_BITCODE = NO;
295 | INFOPLIST_FILE = Runner/Info.plist;
296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
297 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
298 | PRODUCT_NAME = "$(TARGET_NAME)";
299 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
300 | SWIFT_VERSION = 5.0;
301 | VERSIONING_SYSTEM = "apple-generic";
302 | };
303 | name = Profile;
304 | };
305 | 97C147031CF9000F007C117D /* Debug */ = {
306 | isa = XCBuildConfiguration;
307 | buildSettings = {
308 | ALWAYS_SEARCH_USER_PATHS = NO;
309 | CLANG_ANALYZER_NONNULL = YES;
310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
311 | CLANG_CXX_LIBRARY = "libc++";
312 | CLANG_ENABLE_MODULES = YES;
313 | CLANG_ENABLE_OBJC_ARC = YES;
314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
315 | CLANG_WARN_BOOL_CONVERSION = YES;
316 | CLANG_WARN_COMMA = YES;
317 | CLANG_WARN_CONSTANT_CONVERSION = YES;
318 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
320 | CLANG_WARN_EMPTY_BODY = YES;
321 | CLANG_WARN_ENUM_CONVERSION = YES;
322 | CLANG_WARN_INFINITE_RECURSION = YES;
323 | CLANG_WARN_INT_CONVERSION = YES;
324 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
325 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
326 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
328 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
329 | CLANG_WARN_STRICT_PROTOTYPES = YES;
330 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
331 | CLANG_WARN_UNREACHABLE_CODE = YES;
332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
334 | COPY_PHASE_STRIP = NO;
335 | DEBUG_INFORMATION_FORMAT = dwarf;
336 | ENABLE_STRICT_OBJC_MSGSEND = YES;
337 | ENABLE_TESTABILITY = YES;
338 | GCC_C_LANGUAGE_STANDARD = gnu99;
339 | GCC_DYNAMIC_NO_PIC = NO;
340 | GCC_NO_COMMON_BLOCKS = YES;
341 | GCC_OPTIMIZATION_LEVEL = 0;
342 | GCC_PREPROCESSOR_DEFINITIONS = (
343 | "DEBUG=1",
344 | "$(inherited)",
345 | );
346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
348 | GCC_WARN_UNDECLARED_SELECTOR = YES;
349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
350 | GCC_WARN_UNUSED_FUNCTION = YES;
351 | GCC_WARN_UNUSED_VARIABLE = YES;
352 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
353 | MTL_ENABLE_DEBUG_INFO = YES;
354 | ONLY_ACTIVE_ARCH = YES;
355 | SDKROOT = iphoneos;
356 | TARGETED_DEVICE_FAMILY = "1,2";
357 | };
358 | name = Debug;
359 | };
360 | 97C147041CF9000F007C117D /* Release */ = {
361 | isa = XCBuildConfiguration;
362 | buildSettings = {
363 | ALWAYS_SEARCH_USER_PATHS = NO;
364 | CLANG_ANALYZER_NONNULL = YES;
365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
366 | CLANG_CXX_LIBRARY = "libc++";
367 | CLANG_ENABLE_MODULES = YES;
368 | CLANG_ENABLE_OBJC_ARC = YES;
369 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
370 | CLANG_WARN_BOOL_CONVERSION = YES;
371 | CLANG_WARN_COMMA = YES;
372 | CLANG_WARN_CONSTANT_CONVERSION = YES;
373 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
375 | CLANG_WARN_EMPTY_BODY = YES;
376 | CLANG_WARN_ENUM_CONVERSION = YES;
377 | CLANG_WARN_INFINITE_RECURSION = YES;
378 | CLANG_WARN_INT_CONVERSION = YES;
379 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
380 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
381 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
383 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
384 | CLANG_WARN_STRICT_PROTOTYPES = YES;
385 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
386 | CLANG_WARN_UNREACHABLE_CODE = YES;
387 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
388 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
389 | COPY_PHASE_STRIP = NO;
390 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
391 | ENABLE_NS_ASSERTIONS = NO;
392 | ENABLE_STRICT_OBJC_MSGSEND = YES;
393 | GCC_C_LANGUAGE_STANDARD = gnu99;
394 | GCC_NO_COMMON_BLOCKS = YES;
395 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
396 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
397 | GCC_WARN_UNDECLARED_SELECTOR = YES;
398 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
399 | GCC_WARN_UNUSED_FUNCTION = YES;
400 | GCC_WARN_UNUSED_VARIABLE = YES;
401 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
402 | MTL_ENABLE_DEBUG_INFO = NO;
403 | SDKROOT = iphoneos;
404 | SUPPORTED_PLATFORMS = iphoneos;
405 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
406 | TARGETED_DEVICE_FAMILY = "1,2";
407 | VALIDATE_PRODUCT = YES;
408 | };
409 | name = Release;
410 | };
411 | 97C147061CF9000F007C117D /* Debug */ = {
412 | isa = XCBuildConfiguration;
413 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
414 | buildSettings = {
415 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
416 | CLANG_ENABLE_MODULES = YES;
417 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
418 | ENABLE_BITCODE = NO;
419 | INFOPLIST_FILE = Runner/Info.plist;
420 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
421 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
422 | PRODUCT_NAME = "$(TARGET_NAME)";
423 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
424 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
425 | SWIFT_VERSION = 5.0;
426 | VERSIONING_SYSTEM = "apple-generic";
427 | };
428 | name = Debug;
429 | };
430 | 97C147071CF9000F007C117D /* Release */ = {
431 | isa = XCBuildConfiguration;
432 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
433 | buildSettings = {
434 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
435 | CLANG_ENABLE_MODULES = YES;
436 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
437 | ENABLE_BITCODE = NO;
438 | INFOPLIST_FILE = Runner/Info.plist;
439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
440 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
441 | PRODUCT_NAME = "$(TARGET_NAME)";
442 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
443 | SWIFT_VERSION = 5.0;
444 | VERSIONING_SYSTEM = "apple-generic";
445 | };
446 | name = Release;
447 | };
448 | /* End XCBuildConfiguration section */
449 |
450 | /* Begin XCConfigurationList section */
451 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
452 | isa = XCConfigurationList;
453 | buildConfigurations = (
454 | 97C147031CF9000F007C117D /* Debug */,
455 | 97C147041CF9000F007C117D /* Release */,
456 | 249021D3217E4FDB00AE95B9 /* Profile */,
457 | );
458 | defaultConfigurationIsVisible = 0;
459 | defaultConfigurationName = Release;
460 | };
461 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
462 | isa = XCConfigurationList;
463 | buildConfigurations = (
464 | 97C147061CF9000F007C117D /* Debug */,
465 | 97C147071CF9000F007C117D /* Release */,
466 | 249021D4217E4FDB00AE95B9 /* Profile */,
467 | );
468 | defaultConfigurationIsVisible = 0;
469 | defaultConfigurationName = Release;
470 | };
471 | /* End XCConfigurationList section */
472 | };
473 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
474 | }
475 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 51;
7 | objects = {
8 |
9 | /* Begin PBXAggregateTarget section */
10 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
11 | isa = PBXAggregateTarget;
12 | buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
13 | buildPhases = (
14 | 33CC111E2044C6BF0003C045 /* ShellScript */,
15 | );
16 | dependencies = (
17 | );
18 | name = "Flutter Assemble";
19 | productName = FLX;
20 | };
21 | /* End PBXAggregateTarget section */
22 |
23 | /* Begin PBXBuildFile section */
24 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
25 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
26 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
27 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
28 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = 33CC111A2044C6BA0003C045;
37 | remoteInfo = FLX;
38 | };
39 | /* End PBXContainerItemProxy section */
40 |
41 | /* Begin PBXCopyFilesBuildPhase section */
42 | 33CC110E2044A8840003C045 /* Bundle Framework */ = {
43 | isa = PBXCopyFilesBuildPhase;
44 | buildActionMask = 2147483647;
45 | dstPath = "";
46 | dstSubfolderSpec = 10;
47 | files = (
48 | );
49 | name = "Bundle Framework";
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXCopyFilesBuildPhase section */
53 |
54 | /* Begin PBXFileReference section */
55 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
56 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
57 | 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
59 | 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
60 | 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
61 | 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; };
62 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; };
63 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; };
64 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; };
65 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; };
66 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
67 | 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
68 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
69 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
70 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
71 | /* End PBXFileReference section */
72 |
73 | /* Begin PBXFrameworksBuildPhase section */
74 | 33CC10EA2044A3C60003C045 /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | /* End PBXFrameworksBuildPhase section */
82 |
83 | /* Begin PBXGroup section */
84 | 33BA886A226E78AF003329D5 /* Configs */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
88 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
89 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
90 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
91 | );
92 | path = Configs;
93 | sourceTree = "";
94 | };
95 | 33CC10E42044A3C60003C045 = {
96 | isa = PBXGroup;
97 | children = (
98 | 33FAB671232836740065AC1E /* Runner */,
99 | 33CEB47122A05771004F2AC0 /* Flutter */,
100 | 33CC10EE2044A3C60003C045 /* Products */,
101 | D73912EC22F37F3D000D13A0 /* Frameworks */,
102 | );
103 | sourceTree = "";
104 | };
105 | 33CC10EE2044A3C60003C045 /* Products */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 33CC10ED2044A3C60003C045 /* example.app */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | 33CC11242044D66E0003C045 /* Resources */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 33CC10F22044A3C60003C045 /* Assets.xcassets */,
117 | 33CC10F42044A3C60003C045 /* MainMenu.xib */,
118 | 33CC10F72044A3C60003C045 /* Info.plist */,
119 | );
120 | name = Resources;
121 | path = ..;
122 | sourceTree = "";
123 | };
124 | 33CEB47122A05771004F2AC0 /* Flutter */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
128 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
129 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
130 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
131 | );
132 | path = Flutter;
133 | sourceTree = "";
134 | };
135 | 33FAB671232836740065AC1E /* Runner */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
139 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
140 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
141 | 33E51914231749380026EE4D /* Release.entitlements */,
142 | 33CC11242044D66E0003C045 /* Resources */,
143 | 33BA886A226E78AF003329D5 /* Configs */,
144 | );
145 | path = Runner;
146 | sourceTree = "";
147 | };
148 | D73912EC22F37F3D000D13A0 /* Frameworks */ = {
149 | isa = PBXGroup;
150 | children = (
151 | );
152 | name = Frameworks;
153 | sourceTree = "";
154 | };
155 | /* End PBXGroup section */
156 |
157 | /* Begin PBXNativeTarget section */
158 | 33CC10EC2044A3C60003C045 /* Runner */ = {
159 | isa = PBXNativeTarget;
160 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
161 | buildPhases = (
162 | 33CC10E92044A3C60003C045 /* Sources */,
163 | 33CC10EA2044A3C60003C045 /* Frameworks */,
164 | 33CC10EB2044A3C60003C045 /* Resources */,
165 | 33CC110E2044A8840003C045 /* Bundle Framework */,
166 | 3399D490228B24CF009A79C7 /* ShellScript */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | 33CC11202044C79F0003C045 /* PBXTargetDependency */,
172 | );
173 | name = Runner;
174 | productName = Runner;
175 | productReference = 33CC10ED2044A3C60003C045 /* example.app */;
176 | productType = "com.apple.product-type.application";
177 | };
178 | /* End PBXNativeTarget section */
179 |
180 | /* Begin PBXProject section */
181 | 33CC10E52044A3C60003C045 /* Project object */ = {
182 | isa = PBXProject;
183 | attributes = {
184 | LastSwiftUpdateCheck = 0920;
185 | LastUpgradeCheck = 0930;
186 | ORGANIZATIONNAME = "";
187 | TargetAttributes = {
188 | 33CC10EC2044A3C60003C045 = {
189 | CreatedOnToolsVersion = 9.2;
190 | LastSwiftMigration = 1100;
191 | ProvisioningStyle = Automatic;
192 | SystemCapabilities = {
193 | com.apple.Sandbox = {
194 | enabled = 1;
195 | };
196 | };
197 | };
198 | 33CC111A2044C6BA0003C045 = {
199 | CreatedOnToolsVersion = 9.2;
200 | ProvisioningStyle = Manual;
201 | };
202 | };
203 | };
204 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
205 | compatibilityVersion = "Xcode 9.3";
206 | developmentRegion = en;
207 | hasScannedForEncodings = 0;
208 | knownRegions = (
209 | en,
210 | Base,
211 | );
212 | mainGroup = 33CC10E42044A3C60003C045;
213 | productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
214 | projectDirPath = "";
215 | projectRoot = "";
216 | targets = (
217 | 33CC10EC2044A3C60003C045 /* Runner */,
218 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
219 | );
220 | };
221 | /* End PBXProject section */
222 |
223 | /* Begin PBXResourcesBuildPhase section */
224 | 33CC10EB2044A3C60003C045 /* Resources */ = {
225 | isa = PBXResourcesBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
229 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | };
233 | /* End PBXResourcesBuildPhase section */
234 |
235 | /* Begin PBXShellScriptBuildPhase section */
236 | 3399D490228B24CF009A79C7 /* ShellScript */ = {
237 | isa = PBXShellScriptBuildPhase;
238 | buildActionMask = 2147483647;
239 | files = (
240 | );
241 | inputFileListPaths = (
242 | );
243 | inputPaths = (
244 | );
245 | outputFileListPaths = (
246 | );
247 | outputPaths = (
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
252 | };
253 | 33CC111E2044C6BF0003C045 /* ShellScript */ = {
254 | isa = PBXShellScriptBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | inputFileListPaths = (
259 | Flutter/ephemeral/FlutterInputs.xcfilelist,
260 | );
261 | inputPaths = (
262 | Flutter/ephemeral/tripwire,
263 | );
264 | outputFileListPaths = (
265 | Flutter/ephemeral/FlutterOutputs.xcfilelist,
266 | );
267 | outputPaths = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | shellPath = /bin/sh;
271 | shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
272 | };
273 | /* End PBXShellScriptBuildPhase section */
274 |
275 | /* Begin PBXSourcesBuildPhase section */
276 | 33CC10E92044A3C60003C045 /* Sources */ = {
277 | isa = PBXSourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
281 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
282 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
283 | );
284 | runOnlyForDeploymentPostprocessing = 0;
285 | };
286 | /* End PBXSourcesBuildPhase section */
287 |
288 | /* Begin PBXTargetDependency section */
289 | 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
290 | isa = PBXTargetDependency;
291 | target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
292 | targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
293 | };
294 | /* End PBXTargetDependency section */
295 |
296 | /* Begin PBXVariantGroup section */
297 | 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
298 | isa = PBXVariantGroup;
299 | children = (
300 | 33CC10F52044A3C60003C045 /* Base */,
301 | );
302 | name = MainMenu.xib;
303 | path = Runner;
304 | sourceTree = "";
305 | };
306 | /* End PBXVariantGroup section */
307 |
308 | /* Begin XCBuildConfiguration section */
309 | 338D0CE9231458BD00FA5F75 /* Profile */ = {
310 | isa = XCBuildConfiguration;
311 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
317 | CLANG_CXX_LIBRARY = "libc++";
318 | CLANG_ENABLE_MODULES = YES;
319 | CLANG_ENABLE_OBJC_ARC = YES;
320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
321 | CLANG_WARN_BOOL_CONVERSION = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
326 | CLANG_WARN_EMPTY_BODY = YES;
327 | CLANG_WARN_ENUM_CONVERSION = YES;
328 | CLANG_WARN_INFINITE_RECURSION = YES;
329 | CLANG_WARN_INT_CONVERSION = YES;
330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
335 | CODE_SIGN_IDENTITY = "-";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu11;
341 | GCC_NO_COMMON_BLOCKS = YES;
342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
345 | GCC_WARN_UNUSED_FUNCTION = YES;
346 | GCC_WARN_UNUSED_VARIABLE = YES;
347 | MACOSX_DEPLOYMENT_TARGET = 10.11;
348 | MTL_ENABLE_DEBUG_INFO = NO;
349 | SDKROOT = macosx;
350 | SWIFT_COMPILATION_MODE = wholemodule;
351 | SWIFT_OPTIMIZATION_LEVEL = "-O";
352 | };
353 | name = Profile;
354 | };
355 | 338D0CEA231458BD00FA5F75 /* Profile */ = {
356 | isa = XCBuildConfiguration;
357 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
358 | buildSettings = {
359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360 | CLANG_ENABLE_MODULES = YES;
361 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
362 | CODE_SIGN_STYLE = Automatic;
363 | COMBINE_HIDPI_IMAGES = YES;
364 | INFOPLIST_FILE = Runner/Info.plist;
365 | LD_RUNPATH_SEARCH_PATHS = (
366 | "$(inherited)",
367 | "@executable_path/../Frameworks",
368 | );
369 | PROVISIONING_PROFILE_SPECIFIER = "";
370 | SWIFT_VERSION = 5.0;
371 | };
372 | name = Profile;
373 | };
374 | 338D0CEB231458BD00FA5F75 /* Profile */ = {
375 | isa = XCBuildConfiguration;
376 | buildSettings = {
377 | CODE_SIGN_STYLE = Manual;
378 | PRODUCT_NAME = "$(TARGET_NAME)";
379 | };
380 | name = Profile;
381 | };
382 | 33CC10F92044A3C60003C045 /* Debug */ = {
383 | isa = XCBuildConfiguration;
384 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
385 | buildSettings = {
386 | ALWAYS_SEARCH_USER_PATHS = NO;
387 | CLANG_ANALYZER_NONNULL = YES;
388 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
390 | CLANG_CXX_LIBRARY = "libc++";
391 | CLANG_ENABLE_MODULES = YES;
392 | CLANG_ENABLE_OBJC_ARC = YES;
393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
394 | CLANG_WARN_BOOL_CONVERSION = YES;
395 | CLANG_WARN_CONSTANT_CONVERSION = YES;
396 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
399 | CLANG_WARN_EMPTY_BODY = YES;
400 | CLANG_WARN_ENUM_CONVERSION = YES;
401 | CLANG_WARN_INFINITE_RECURSION = YES;
402 | CLANG_WARN_INT_CONVERSION = YES;
403 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
404 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
406 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
407 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
408 | CODE_SIGN_IDENTITY = "-";
409 | COPY_PHASE_STRIP = NO;
410 | DEBUG_INFORMATION_FORMAT = dwarf;
411 | ENABLE_STRICT_OBJC_MSGSEND = YES;
412 | ENABLE_TESTABILITY = YES;
413 | GCC_C_LANGUAGE_STANDARD = gnu11;
414 | GCC_DYNAMIC_NO_PIC = NO;
415 | GCC_NO_COMMON_BLOCKS = YES;
416 | GCC_OPTIMIZATION_LEVEL = 0;
417 | GCC_PREPROCESSOR_DEFINITIONS = (
418 | "DEBUG=1",
419 | "$(inherited)",
420 | );
421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
424 | GCC_WARN_UNUSED_FUNCTION = YES;
425 | GCC_WARN_UNUSED_VARIABLE = YES;
426 | MACOSX_DEPLOYMENT_TARGET = 10.11;
427 | MTL_ENABLE_DEBUG_INFO = YES;
428 | ONLY_ACTIVE_ARCH = YES;
429 | SDKROOT = macosx;
430 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
431 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
432 | };
433 | name = Debug;
434 | };
435 | 33CC10FA2044A3C60003C045 /* Release */ = {
436 | isa = XCBuildConfiguration;
437 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
438 | buildSettings = {
439 | ALWAYS_SEARCH_USER_PATHS = NO;
440 | CLANG_ANALYZER_NONNULL = YES;
441 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
443 | CLANG_CXX_LIBRARY = "libc++";
444 | CLANG_ENABLE_MODULES = YES;
445 | CLANG_ENABLE_OBJC_ARC = YES;
446 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
447 | CLANG_WARN_BOOL_CONVERSION = YES;
448 | CLANG_WARN_CONSTANT_CONVERSION = YES;
449 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
451 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
452 | CLANG_WARN_EMPTY_BODY = YES;
453 | CLANG_WARN_ENUM_CONVERSION = YES;
454 | CLANG_WARN_INFINITE_RECURSION = YES;
455 | CLANG_WARN_INT_CONVERSION = YES;
456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
457 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
458 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
459 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
460 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
461 | CODE_SIGN_IDENTITY = "-";
462 | COPY_PHASE_STRIP = NO;
463 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
464 | ENABLE_NS_ASSERTIONS = NO;
465 | ENABLE_STRICT_OBJC_MSGSEND = YES;
466 | GCC_C_LANGUAGE_STANDARD = gnu11;
467 | GCC_NO_COMMON_BLOCKS = YES;
468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
471 | GCC_WARN_UNUSED_FUNCTION = YES;
472 | GCC_WARN_UNUSED_VARIABLE = YES;
473 | MACOSX_DEPLOYMENT_TARGET = 10.11;
474 | MTL_ENABLE_DEBUG_INFO = NO;
475 | SDKROOT = macosx;
476 | SWIFT_COMPILATION_MODE = wholemodule;
477 | SWIFT_OPTIMIZATION_LEVEL = "-O";
478 | };
479 | name = Release;
480 | };
481 | 33CC10FC2044A3C60003C045 /* Debug */ = {
482 | isa = XCBuildConfiguration;
483 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
484 | buildSettings = {
485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486 | CLANG_ENABLE_MODULES = YES;
487 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
488 | CODE_SIGN_STYLE = Automatic;
489 | COMBINE_HIDPI_IMAGES = YES;
490 | INFOPLIST_FILE = Runner/Info.plist;
491 | LD_RUNPATH_SEARCH_PATHS = (
492 | "$(inherited)",
493 | "@executable_path/../Frameworks",
494 | );
495 | PROVISIONING_PROFILE_SPECIFIER = "";
496 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
497 | SWIFT_VERSION = 5.0;
498 | };
499 | name = Debug;
500 | };
501 | 33CC10FD2044A3C60003C045 /* Release */ = {
502 | isa = XCBuildConfiguration;
503 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
504 | buildSettings = {
505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
506 | CLANG_ENABLE_MODULES = YES;
507 | CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
508 | CODE_SIGN_STYLE = Automatic;
509 | COMBINE_HIDPI_IMAGES = YES;
510 | INFOPLIST_FILE = Runner/Info.plist;
511 | LD_RUNPATH_SEARCH_PATHS = (
512 | "$(inherited)",
513 | "@executable_path/../Frameworks",
514 | );
515 | PROVISIONING_PROFILE_SPECIFIER = "";
516 | SWIFT_VERSION = 5.0;
517 | };
518 | name = Release;
519 | };
520 | 33CC111C2044C6BA0003C045 /* Debug */ = {
521 | isa = XCBuildConfiguration;
522 | buildSettings = {
523 | CODE_SIGN_STYLE = Manual;
524 | PRODUCT_NAME = "$(TARGET_NAME)";
525 | };
526 | name = Debug;
527 | };
528 | 33CC111D2044C6BA0003C045 /* Release */ = {
529 | isa = XCBuildConfiguration;
530 | buildSettings = {
531 | CODE_SIGN_STYLE = Automatic;
532 | PRODUCT_NAME = "$(TARGET_NAME)";
533 | };
534 | name = Release;
535 | };
536 | /* End XCBuildConfiguration section */
537 |
538 | /* Begin XCConfigurationList section */
539 | 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
540 | isa = XCConfigurationList;
541 | buildConfigurations = (
542 | 33CC10F92044A3C60003C045 /* Debug */,
543 | 33CC10FA2044A3C60003C045 /* Release */,
544 | 338D0CE9231458BD00FA5F75 /* Profile */,
545 | );
546 | defaultConfigurationIsVisible = 0;
547 | defaultConfigurationName = Release;
548 | };
549 | 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
550 | isa = XCConfigurationList;
551 | buildConfigurations = (
552 | 33CC10FC2044A3C60003C045 /* Debug */,
553 | 33CC10FD2044A3C60003C045 /* Release */,
554 | 338D0CEA231458BD00FA5F75 /* Profile */,
555 | );
556 | defaultConfigurationIsVisible = 0;
557 | defaultConfigurationName = Release;
558 | };
559 | 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
560 | isa = XCConfigurationList;
561 | buildConfigurations = (
562 | 33CC111C2044C6BA0003C045 /* Debug */,
563 | 33CC111D2044C6BA0003C045 /* Release */,
564 | 338D0CEB231458BD00FA5F75 /* Profile */,
565 | );
566 | defaultConfigurationIsVisible = 0;
567 | defaultConfigurationName = Release;
568 | };
569 | /* End XCConfigurationList section */
570 | };
571 | rootObject = 33CC10E52044A3C60003C045 /* Project object */;
572 | }
573 |
--------------------------------------------------------------------------------
/example/macos/Runner/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
--------------------------------------------------------------------------------