Kaynağa Gözat

feat: flutter mobile app

    * feat: removed debug statements
    * feat: tested controller layer
    * feat: simple test of status bar
    * feat: play songs when selecting them
    * feat: songs list
    * feat: albums list
    * feat: basic artists list
    * feat: working play / pause button
    * feat: player state controller
    * feat: simple status bar and identified / anonymous content split
    * feat: connect to websocket and display messages
    * feat: nginx proxy with self-signed https mode
    * feat: get package, name change controller
    * feat: stateless widget with async redux store and name value
    * feat: initial flutter project setup
Fela Maslen 4 yıl önce
ebeveyn
işleme
ab61154b2b
83 değiştirilmiş dosya ile 2773 ekleme ve 2 silme
  1. 34 0
      gmus-backend/certificates/cert.pem
  2. 52 0
      gmus-backend/certificates/key.pem
  3. 18 2
      gmus-backend/docker-compose.yml
  4. 57 0
      gmus-backend/nginx.conf
  5. 2 0
      gmus-mobile/.env.example
  6. 41 0
      gmus-mobile/.gitignore
  7. 10 0
      gmus-mobile/.metadata
  8. 16 0
      gmus-mobile/README.md
  9. 11 0
      gmus-mobile/android/.gitignore
  10. 63 0
      gmus-mobile/android/app/build.gradle
  11. 7 0
      gmus-mobile/android/app/src/debug/AndroidManifest.xml
  12. 47 0
      gmus-mobile/android/app/src/main/AndroidManifest.xml
  13. 6 0
      gmus-mobile/android/app/src/main/kotlin/com/example/gmus_mobile/MainActivity.kt
  14. 12 0
      gmus-mobile/android/app/src/main/res/drawable/launch_background.xml
  15. BIN
      gmus-mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  16. BIN
      gmus-mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  17. BIN
      gmus-mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  18. BIN
      gmus-mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  19. BIN
      gmus-mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  20. 18 0
      gmus-mobile/android/app/src/main/res/values/styles.xml
  21. 7 0
      gmus-mobile/android/app/src/profile/AndroidManifest.xml
  22. 31 0
      gmus-mobile/android/build.gradle
  23. 4 0
      gmus-mobile/android/gradle.properties
  24. 6 0
      gmus-mobile/android/gradle/wrapper/gradle-wrapper.properties
  25. 11 0
      gmus-mobile/android/settings.gradle
  26. 32 0
      gmus-mobile/ios/.gitignore
  27. 26 0
      gmus-mobile/ios/Flutter/AppFrameworkInfo.plist
  28. 1 0
      gmus-mobile/ios/Flutter/Debug.xcconfig
  29. 1 0
      gmus-mobile/ios/Flutter/Release.xcconfig
  30. 495 0
      gmus-mobile/ios/Runner.xcodeproj/project.pbxproj
  31. 7 0
      gmus-mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  32. 8 0
      gmus-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  33. 8 0
      gmus-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  34. 91 0
      gmus-mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  35. 7 0
      gmus-mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
  36. 8 0
      gmus-mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  37. 8 0
      gmus-mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  38. 13 0
      gmus-mobile/ios/Runner/AppDelegate.swift
  39. 122 0
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  40. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  41. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  42. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  43. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  44. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  45. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  46. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  47. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  48. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  49. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  50. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  51. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  52. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  53. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  54. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  55. 23 0
      gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  56. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  57. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  58. BIN
      gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  59. 5 0
      gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  60. 37 0
      gmus-mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard
  61. 26 0
      gmus-mobile/ios/Runner/Base.lproj/Main.storyboard
  62. 45 0
      gmus-mobile/ios/Runner/Info.plist
  63. 1 0
      gmus-mobile/ios/Runner/Runner-Bridging-Header.h
  64. 2 0
      gmus-mobile/lib/actions.dart
  65. 93 0
      gmus-mobile/lib/components/albums.dart
  66. 83 0
      gmus-mobile/lib/components/artists.dart
  67. 63 0
      gmus-mobile/lib/components/browser.dart
  68. 23 0
      gmus-mobile/lib/components/content.dart
  69. 29 0
      gmus-mobile/lib/components/identify.dart
  70. 26 0
      gmus-mobile/lib/components/player.dart
  71. 106 0
      gmus-mobile/lib/components/songs.dart
  72. 15 0
      gmus-mobile/lib/components/spinner.dart
  73. 32 0
      gmus-mobile/lib/components/status.dart
  74. 21 0
      gmus-mobile/lib/components/ui.dart
  75. 6 0
      gmus-mobile/lib/config.dart
  76. 128 0
      gmus-mobile/lib/controller.dart
  77. 53 0
      gmus-mobile/lib/main.dart
  78. 46 0
      gmus-mobile/lib/socket.dart
  79. 21 0
      gmus-mobile/lib/types/song.dart
  80. 349 0
      gmus-mobile/pubspec.lock
  81. 79 0
      gmus-mobile/pubspec.yaml
  82. 41 0
      gmus-mobile/test/components/status_test.dart
  83. 140 0
      gmus-mobile/test/controller_test.dart

+ 34 - 0
gmus-backend/certificates/cert.pem

@@ -0,0 +1,34 @@
+-----BEGIN CERTIFICATE-----
+MIIF0zCCA7ugAwIBAgIUdh1Z5iFt2wJTotTlNEVOy/c04B0wDQYJKoZIhvcNAQEL
+BQAweTELMAkGA1UEBhMCR0IxEDAOBgNVBAgMB0VuZ2xhbmQxDzANBgNVBAcMBkxv
+bmRvbjEQMA4GA1UECgwHbXkuZ211czEQMA4GA1UEAwwHbXkuZ211czEjMCEGCSqG
+SIb3DQEJARYUZmVsYW1hc2xlbkBnbWFpbC5jb20wHhcNMjEwMjE2MTEyNTUyWhcN
+MzEwMjE0MTEyNTUyWjB5MQswCQYDVQQGEwJHQjEQMA4GA1UECAwHRW5nbGFuZDEP
+MA0GA1UEBwwGTG9uZG9uMRAwDgYDVQQKDAdteS5nbXVzMRAwDgYDVQQDDAdteS5n
+bXVzMSMwIQYJKoZIhvcNAQkBFhRmZWxhbWFzbGVuQGdtYWlsLmNvbTCCAiIwDQYJ
+KoZIhvcNAQEBBQADggIPADCCAgoCggIBAPk4PaHBvW2sPhHRBCOEz+kkfeEkiy5g
+PGO6EpH18+ohE6OkFNIQhJFSaEqKmRFB5witTAQxcVazehJ3yCsnr0Yj8ig5utcZ
+PregbUUiCS+SamNVSRzkGShD8WzD210wTQBssjDNmXsjuKtLempurMfIY4RT3h7F
+7z9Wo3PQGD5jpGlQX1A5hTXYJmebZj0482wqDGby/mm0IYpe+F0T8mw17PlhPYHL
+fYYH3ELnyBmdSO2RFhxo7DCj0MTRIDT2sPcjyQXjnATRgVr2BoarF8UNhMPoiVhq
+N/YTxrxkzEUeRIpwUtqv8TC7QHjQD7ac75g76bmIFzDpmdw4AUkeXN3qY6kQXv40
+n3BmQN86TIfbfjJiyDs14IxtXIMZSR+c5jxsibMZKU4P8YXE1Gh/MsSVMmP+nnHA
+19jm7UoOpboW3y6jdqRwThh8H1ZYdyH7Y/vxuj8FMOepOo42CAfnm2h7lwfF9Zqi
+HJ9lp72Ns7n96U64hwld8VCLUwYW1al66nmR3j/ppGSoso1UjkZ8kl9BUFZOQbg6
+uTknI47tfvT3QAbSigRVU6xGljiKVOy1uZx7CjMTpi6sjzUKFKiq7csjXgRbxWbw
++wwEdi6rZhkgyq34UETRhFhKp6pSlBLd9EfcTO16LVzd9ataA92ydxclmfUOX44L
+Dk7bL6wkKrKzAgMBAAGjUzBRMB0GA1UdDgQWBBTG25eq5Gm2gsR9oPJrWQpVJ2I3
+zTAfBgNVHSMEGDAWgBTG25eq5Gm2gsR9oPJrWQpVJ2I3zTAPBgNVHRMBAf8EBTAD
+AQH/MA0GCSqGSIb3DQEBCwUAA4ICAQA2lfgN/iAXld9PVkelCBuVYeeyKwplxy44
+ZwS9FUYxZZ+wonwphg4BJ63gsqqhyc/W0XvSjiczYNZyH37P6xE8ZCM0WcxACDrK
+UL8+p+Q9bvWi0z+I7EC8TMiHCU9GSCsXTBOsRY8rLorC7FPdyjhf5W/mzjcxvuAN
+LYkWt3L4jyItsPbIAqvUIZ2DTqUINLACZAmISVndvy0E3d8KdolQ31R7a4DnK1MO
+BqolyqOeLCSogg1pZLZgmLasBE57IedqyltHpFcDURzOb3AOlcZFd+2Goyy1qkRD
+P+dE6X2i2TDinUL0Hz3GZmK9b2FDkCVnMWvom5t+rcnmumG+cVbrxN9xm7KJTsND
+r2YXHQnwR/akTNSM9k9Fto2wjFGKTwQQ8vkk2y3EF9yp8Xo/UPim1o/46vPvADk3
+d4vAvNwz1agkVoO8GWQ3iVdmTATO7iow3Lq0O2Wer0znuk7DnRbtv4XV9YlxRtFJ
+w8F40COMLexdmm00qe2AeULj+4vtUUU24RMfEYdLpgGw/OdxqqcrsO03jXxe5SSm
+TjQERWGuPVaJUk71lRFoExDRA6hUbKtRU7PBgS2jgxL846pK/x9zZJqldzt59agH
+iVlkdyaNVQRdKZsaDq1mfTq+5N1c65gYTKUvxSiNJIzYp1bwa/NZQDNTPwKwXyUv
+/Ls43CIT4Q==
+-----END CERTIFICATE-----

+ 52 - 0
gmus-backend/certificates/key.pem

@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+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
+Yp2K0vlyKXRvIIbarSNtYrocAGKhnw==
+-----END PRIVATE KEY-----

+ 18 - 2
gmus-backend/docker-compose.yml

@@ -1,5 +1,20 @@
 version: "2"
 services:
+  nginx:
+    image: nginx:alpine
+    container_name: gmus_nginx
+    volumes:
+      - ./nginx.conf:/etc/nginx/nginx.conf
+      - ./certificates:/etc/certificates
+    links:
+      - gmus-backend:gmus-backend
+    networks:
+      - net_gmus_dev
+    ports:
+      - ${PORT}:80
+      - ${PORT_SECURE}:443
+    env_file:
+      - .env
   gmus-backend:
     container_name: gmus-backend
     build:
@@ -7,19 +22,20 @@ services:
     volumes:
       - .:/app
       - /app/bin
+      - ${LIBRARY_DIRECTORY}:/library
     links:
       - gmus-db:db
       - gmus-redis:redis
     networks:
       - net_gmus_dev
     ports:
-      - 3002:80
+      - 3000
     env_file:
       - .env
     environment:
       GO_ENV: development
       HOST: 0.0.0.0
-      PORT: 80
+      PORT: 3000
       POSTGRES_HOST: db
       POSTGRES_DATABASE: music_player
       POSTGRES_USER: docker

+ 57 - 0
gmus-backend/nginx.conf

@@ -0,0 +1,57 @@
+events {
+  worker_connections 768;
+}
+
+http {
+  server {
+    listen 80;
+    access_log off; # this is handled by the container
+    error_log off;
+
+    server_name my.gmus;
+
+    location / {
+      proxy_pass http://gmus-backend:3000;
+      proxy_set_header Host $http_host;
+      proxy_set_header X-Real-IP $remote_addr;
+      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+      proxy_set_header X-Forwarded-Proto $scheme;
+    }
+
+    location /pubsub {
+      proxy_pass http://gmus-backend:3000/pubsub;
+      proxy_http_version 1.1;
+      proxy_set_header Upgrade $http_upgrade;
+      proxy_set_header Connection "Upgrade";
+      proxy_set_header Host $host;
+    }
+  }
+
+  server {
+    listen 443 ssl http2;
+    access_log off; # this is handled by the container
+    error_log off;
+
+    # self-signed (development mode)
+    ssl_certificate /etc/certificates/cert.pem;
+    ssl_certificate_key /etc/certificates/key.pem;
+
+    server_name my.budget;
+
+    location / {
+      proxy_pass http://gmus-backend:3000;
+      proxy_set_header Host $http_host;
+      proxy_set_header X-Real-IP $remote_addr;
+      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+      proxy_set_header X-Forwarded-Proto $scheme;
+    }
+
+    location /pubsub {
+      proxy_pass http://gmus-backend:3000/pubsub;
+      proxy_http_version 1.1;
+      proxy_set_header Upgrade $http_upgrade;
+      proxy_set_header Connection "Upgrade";
+      proxy_set_header Host $host;
+    }
+  }
+}

+ 2 - 0
gmus-mobile/.env.example

@@ -0,0 +1,2 @@
+DART_ENV=development
+API_URL=https://10.0.2.2:3003

+ 41 - 0
gmus-mobile/.gitignore

@@ -0,0 +1,41 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Web related
+lib/generated_plugin_registrant.dart
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json

+ 10 - 0
gmus-mobile/.metadata

@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+  revision: 78910062997c3a836feee883712c241a5fd22983
+  channel: stable
+
+project_type: app

+ 16 - 0
gmus-mobile/README.md

@@ -0,0 +1,16 @@
+# gmus_mobile
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
+
+For help getting started with Flutter, view our
+[online documentation](https://flutter.dev/docs), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.

+ 11 - 0
gmus-mobile/android/.gitignore

@@ -0,0 +1,11 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties

+ 63 - 0
gmus-mobile/android/app/build.gradle

@@ -0,0 +1,63 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+    localPropertiesFile.withReader('UTF-8') { reader ->
+        localProperties.load(reader)
+    }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+    flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+    flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+    compileSdkVersion 29
+
+    sourceSets {
+        main.java.srcDirs += 'src/main/kotlin'
+    }
+
+    lintOptions {
+        disable 'InvalidPackage'
+    }
+
+    defaultConfig {
+        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+        applicationId "com.example.gmus_mobile"
+        minSdkVersion 16
+        targetSdkVersion 29
+        versionCode flutterVersionCode.toInteger()
+        versionName flutterVersionName
+    }
+
+    buildTypes {
+        release {
+            // TODO: Add your own signing config for the release build.
+            // Signing with the debug keys for now, so `flutter run --release` works.
+            signingConfig signingConfigs.debug
+        }
+    }
+}
+
+flutter {
+    source '../..'
+}
+
+dependencies {
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}

+ 7 - 0
gmus-mobile/android/app/src/debug/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.gmus_mobile">
+    <!-- Flutter needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 47 - 0
gmus-mobile/android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,47 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.gmus_mobile">
+    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
+         calls FlutterMain.startInitialization(this); in its onCreate method.
+         In most cases you can leave this as-is, but you if you want to provide
+         additional functionality it is fine to subclass or reimplement
+         FlutterApplication and put your custom class here. -->
+    <application
+        android:name="io.flutter.app.FlutterApplication"
+        android:label="gmus_mobile"
+        android:icon="@mipmap/ic_launcher">
+        <activity
+            android:name=".MainActivity"
+            android:launchMode="singleTop"
+            android:theme="@style/LaunchTheme"
+            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
+            android:hardwareAccelerated="true"
+            android:windowSoftInputMode="adjustResize">
+            <!-- Specifies an Android theme to apply to this Activity as soon as
+                 the Android process has started. This theme is visible to the user
+                 while the Flutter UI initializes. After that, this theme continues
+                 to determine the Window background behind the Flutter UI. -->
+            <meta-data
+              android:name="io.flutter.embedding.android.NormalTheme"
+              android:resource="@style/NormalTheme"
+              />
+            <!-- Displays an Android View that continues showing the launch screen
+                 Drawable until Flutter paints its first frame, then this splash
+                 screen fades out. A splash screen is useful to avoid any visual
+                 gap between the end of Android's launch screen and the painting of
+                 Flutter's first frame. -->
+            <meta-data
+              android:name="io.flutter.embedding.android.SplashScreenDrawable"
+              android:resource="@drawable/launch_background"
+              />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+        <!-- Don't delete the meta-data below.
+             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
+    </application>
+</manifest>

+ 6 - 0
gmus-mobile/android/app/src/main/kotlin/com/example/gmus_mobile/MainActivity.kt

@@ -0,0 +1,6 @@
+package com.example.gmus_mobile
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}

+ 12 - 0
gmus-mobile/android/app/src/main/res/drawable/launch_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@android:color/white" />
+
+    <!-- You can insert your own image assets here -->
+    <!-- <item>
+        <bitmap
+            android:gravity="center"
+            android:src="@mipmap/launch_image" />
+    </item> -->
+</layer-list>

BIN
gmus-mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
gmus-mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
gmus-mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
gmus-mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
gmus-mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


+ 18 - 0
gmus-mobile/android/app/src/main/res/values/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             Flutter draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+         
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <item name="android:windowBackground">@android:color/white</item>
+    </style>
+</resources>

+ 7 - 0
gmus-mobile/android/app/src/profile/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.gmus_mobile">
+    <!-- Flutter needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 31 - 0
gmus-mobile/android/build.gradle

@@ -0,0 +1,31 @@
+buildscript {
+    ext.kotlin_version = '1.3.50'
+    repositories {
+        google()
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.5.0'
+        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+    project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+    project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 4 - 0
gmus-mobile/android/gradle.properties

@@ -0,0 +1,4 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
+android.enableR8=true

+ 6 - 0
gmus-mobile/android/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

+ 11 - 0
gmus-mobile/android/settings.gradle

@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

+ 32 - 0
gmus-mobile/ios/.gitignore

@@ -0,0 +1,32 @@
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3

+ 26 - 0
gmus-mobile/ios/Flutter/AppFrameworkInfo.plist

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>$(DEVELOPMENT_LANGUAGE)</string>
+  <key>CFBundleExecutable</key>
+  <string>App</string>
+  <key>CFBundleIdentifier</key>
+  <string>io.flutter.flutter.app</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>App</string>
+  <key>CFBundlePackageType</key>
+  <string>FMWK</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1.0</string>
+  <key>MinimumOSVersion</key>
+  <string>8.0</string>
+</dict>
+</plist>

+ 1 - 0
gmus-mobile/ios/Flutter/Debug.xcconfig

@@ -0,0 +1 @@
+#include "Generated.xcconfig"

+ 1 - 0
gmus-mobile/ios/Flutter/Release.xcconfig

@@ -0,0 +1 @@
+#include "Generated.xcconfig"

+ 495 - 0
gmus-mobile/ios/Runner.xcodeproj/project.pbxproj

@@ -0,0 +1,495 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+		74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
+		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
+		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		97C146EB1CF9000F007C117D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		9740EEB11CF90186004384FC /* Flutter */ = {
+			isa = PBXGroup;
+			children = (
+				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+				9740EEB21CF90195004384FC /* Debug.xcconfig */,
+				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+				9740EEB31CF90195004384FC /* Generated.xcconfig */,
+			);
+			name = Flutter;
+			sourceTree = "<group>";
+		};
+		97C146E51CF9000F007C117D = {
+			isa = PBXGroup;
+			children = (
+				9740EEB11CF90186004384FC /* Flutter */,
+				97C146F01CF9000F007C117D /* Runner */,
+				97C146EF1CF9000F007C117D /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		97C146EF1CF9000F007C117D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				97C146EE1CF9000F007C117D /* Runner.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		97C146F01CF9000F007C117D /* Runner */ = {
+			isa = PBXGroup;
+			children = (
+				97C146FA1CF9000F007C117D /* Main.storyboard */,
+				97C146FD1CF9000F007C117D /* Assets.xcassets */,
+				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+				97C147021CF9000F007C117D /* Info.plist */,
+				1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+				1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+				74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+				74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+			);
+			path = Runner;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		97C146ED1CF9000F007C117D /* Runner */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+			buildPhases = (
+				9740EEB61CF901F6004384FC /* Run Script */,
+				97C146EA1CF9000F007C117D /* Sources */,
+				97C146EB1CF9000F007C117D /* Frameworks */,
+				97C146EC1CF9000F007C117D /* Resources */,
+				9705A1C41CF9048500538489 /* Embed Frameworks */,
+				3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Runner;
+			productName = Runner;
+			productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		97C146E61CF9000F007C117D /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 1020;
+				ORGANIZATIONNAME = "";
+				TargetAttributes = {
+					97C146ED1CF9000F007C117D = {
+						CreatedOnToolsVersion = 7.3.1;
+						LastSwiftMigration = 1100;
+					};
+				};
+			};
+			buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+			compatibilityVersion = "Xcode 9.3";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 97C146E51CF9000F007C117D;
+			productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				97C146ED1CF9000F007C117D /* Runner */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		97C146EC1CF9000F007C117D /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+				97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+				97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Thin Binary";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+		};
+		9740EEB61CF901F6004384FC /* Run Script */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Run Script";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		97C146EA1CF9000F007C117D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+				1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C146FB1CF9000F007C117D /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C147001CF9000F007C117D /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		249021D3217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Profile;
+		};
+		249021D4217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.gmusMobile;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Profile;
+		};
+		97C147031CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		97C147041CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		97C147061CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.gmusMobile;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Debug;
+		};
+		97C147071CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.gmusMobile;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147031CF9000F007C117D /* Debug */,
+				97C147041CF9000F007C117D /* Release */,
+				249021D3217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147061CF9000F007C117D /* Debug */,
+				97C147071CF9000F007C117D /* Release */,
+				249021D4217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}

+ 7 - 0
gmus-mobile/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
gmus-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
gmus-mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 91 - 0
gmus-mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1020"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+               BuildableName = "Runner.app"
+               BlueprintName = "Runner"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Profile"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 7 - 0
gmus-mobile/ios/Runner.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
gmus-mobile/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
gmus-mobile/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 13 - 0
gmus-mobile/ios/Runner/AppDelegate.swift

@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+  override func application(
+    _ application: UIApplication,
+    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+  ) -> Bool {
+    GeneratedPluginRegistrant.register(with: self)
+    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+  }
+}

+ 122 - 0
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,122 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-83.5x83.5@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "1024x1024",
+      "idiom" : "ios-marketing",
+      "filename" : "Icon-App-1024x1024@1x.png",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


+ 23 - 0
gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png


BIN
gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png


+ 5 - 0
gmus-mobile/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md

@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

+ 37 - 0
gmus-mobile/ios/Runner/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="LaunchImage" width="168" height="185"/>
+    </resources>
+</document>

+ 26 - 0
gmus-mobile/ios/Runner/Base.lproj/Main.storyboard

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--Flutter View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>

+ 45 - 0
gmus-mobile/ios/Runner/Info.plist

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>gmus_mobile</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>$(FLUTTER_BUILD_NAME)</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>$(FLUTTER_BUILD_NUMBER)</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UIViewControllerBasedStatusBarAppearance</key>
+	<false/>
+</dict>
+</plist>

+ 1 - 0
gmus-mobile/ios/Runner/Runner-Bridging-Header.h

@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"

+ 2 - 0
gmus-mobile/lib/actions.dart

@@ -0,0 +1,2 @@
+const STATE_SET = 'STATE_SET';
+const CLIENT_LIST_UPDATED = 'CLIENT_LIST_UPDATED';

+ 93 - 0
gmus-mobile/lib/components/albums.dart

@@ -0,0 +1,93 @@
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+import 'package:http/http.dart' as http;
+
+import '../config.dart';
+
+import './spinner.dart';
+
+class Albums extends StatefulWidget {
+  final String artist;
+  final void Function(String, String) onSelect;
+
+  Albums({
+    @required this.artist,
+    @required this.onSelect,
+  });
+
+  @override
+  _AlbumsWidgetState createState() => _AlbumsWidgetState(artist: this.artist, onSelect: this.onSelect);
+}
+
+Future<List<String>> fetchAlbums(String artist) async {
+  final response = await http.get(Uri.https(config['apiUrl'], '/albums', {
+    'artist': artist,
+  }));
+
+  if (response.statusCode == 200) {
+    return List<String>.from(jsonDecode(response.body)['albums']);
+  } else {
+    throw Exception('Failed to load albums');
+  }
+}
+
+const allAlbums = 'All albums';
+
+class _AlbumsWidgetState extends State<Albums> {
+  final String artist;
+  Future<List<String>> albums;
+
+  final void Function(String, String) onSelect;
+
+  _AlbumsWidgetState({
+    @required this.artist,
+    @required this.onSelect,
+  });
+
+  @override
+  void initState() {
+    super.initState();
+    albums = fetchAlbums(this.artist);
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return FutureBuilder<List<String>>(
+      future: albums,
+      builder: (context, snapshot) {
+        if (snapshot.hasData) {
+          List<String> albumsWithAll = snapshot.data.sublist(0);
+          albumsWithAll.insert(0, allAlbums);
+          
+          return ListView(
+            padding: EdgeInsets.only(left: 8, right: 8),
+            children: albumsWithAll.map((album) => Container(
+              height: 40,
+              color: Colors.white,
+              child: Align(
+                alignment: Alignment.centerLeft,
+                child: TextButton(
+                  child: Text(album.length == 0 ? 'Unknown album' : album),
+                  onPressed: () {
+                    onSelect(artist, album == allAlbums ? null : album);
+                  },
+                  style: TextButton.styleFrom(
+                    textStyle: TextStyle(fontSize: 18, fontStyle: FontStyle.normal),
+                    primary: Colors.black,
+                  ),
+                ),
+              ),
+            )).toList(),
+          );
+        }
+        if (snapshot.hasError) {
+          return Text("${snapshot.error}");
+        }
+
+        return CenterSpinner();
+      },
+    );
+  }
+}

+ 83 - 0
gmus-mobile/lib/components/artists.dart

@@ -0,0 +1,83 @@
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:http/http.dart' as http;
+
+import '../config.dart';
+import './spinner.dart';
+
+class Artists extends StatefulWidget {
+  final void Function(String) onSelect;
+
+  Artists({
+    @required this.onSelect,
+  });
+
+  @override
+  _ArtistsWidgetState createState() => _ArtistsWidgetState(onSelect: this.onSelect);
+}
+
+Future<List<String>> fetchArtists() async {
+  final response = await http.get(Uri.https(config['apiUrl'], '/artists'));
+
+  if (response.statusCode == 200) {
+    return List<String>.from(jsonDecode(response.body)['artists']);
+  } else {
+    throw Exception('Failed to load artists');
+  }
+}
+
+class _ArtistsWidgetState extends State<Artists> {
+  Future<List<String>> artists;
+
+  final void Function(String) onSelect;
+
+  _ArtistsWidgetState({
+    @required this.onSelect,
+  });
+
+  @override
+  void initState() {
+    super.initState();
+    artists = fetchArtists();
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return FutureBuilder<List<String>>(
+      future: artists,
+      builder: (context, snapshot) {
+        if (snapshot.hasData) {
+          return ListView(
+            padding: EdgeInsets.only(left: 8, right: 8),
+            children: snapshot.data.map((artist) => InkWell(
+              onTap: () {
+                onSelect(artist);
+              },
+              child: SizedBox(
+                height: 40,
+                width: MediaQuery.of(context).size.width,
+                child: Container(
+                  child: Align(
+                    alignment: Alignment.centerLeft,
+                    child: Text(
+                      artist.length == 0 ? 'Unknown artist' : artist,
+                      style: TextStyle(
+                        fontSize: 18,
+                      ),
+                    ),
+                  ),
+                ),
+              ),
+            )).toList(),
+          );
+        }
+        if (snapshot.hasError) {
+          return Text("${snapshot.error}");
+        }
+
+        return CenterSpinner();
+      },
+    );
+  }
+}

+ 63 - 0
gmus-mobile/lib/components/browser.dart

@@ -0,0 +1,63 @@
+import 'package:flutter/widgets.dart';
+import 'package:get/get.dart';
+
+import '../controller.dart';
+
+import './albums.dart';
+import './artists.dart';
+import './songs.dart';
+
+class Browser extends StatefulWidget {
+  @override
+  _BrowserWidgetState createState() => _BrowserWidgetState();
+}
+
+class _BrowserWidgetState extends State<Browser> {
+  final Controller controller = Get.find();
+
+  PageController pageController = PageController();
+
+  void _jumpToPage(int page) {
+    pageController.animateToPage(page, duration: Duration(milliseconds: 500), curve: Curves.ease);
+  }
+  void _jumpToAlbums() {
+    this._jumpToPage(1);
+  }
+  void _jumpToSongs() {
+    this._jumpToPage(2);
+  }
+
+  RxString selectedArtist;
+  RxString selectedAlbum;
+
+  void onSelectArtist(String artist) {
+    this.selectedArtist = artist.obs;
+    this._jumpToAlbums();
+  }
+
+  void onSelectAlbum(String artist, String album) {
+    this.selectedAlbum = album.obs;
+    this._jumpToSongs();
+  }
+
+  void onSelectSong(int songId) {
+    controller.playSong(songId);
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return PageView(
+      controller: pageController,
+      children: <Widget>[
+        Artists(onSelect: this.onSelectArtist),
+        Obx(() => Albums(artist: this.selectedArtist.value, onSelect: this.onSelectAlbum)),
+        Obx(() => Songs(
+          artist: this.selectedArtist.value,
+          album: this.selectedAlbum.value,
+          onSelect: this.onSelectSong,
+        )),
+      ],
+      pageSnapping: true,
+    );
+  }
+}

+ 23 - 0
gmus-mobile/lib/components/content.dart

@@ -0,0 +1,23 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../controller.dart';
+
+import './identify.dart';
+import './ui.dart';
+
+class Content extends StatelessWidget {
+  final Controller controller = Get.find();
+  @override
+  Widget build(BuildContext context) {
+    return Obx(() {
+      var loggedIn = controller.uniqueName.value.length > 0;
+      if (!loggedIn) {
+        return Identify();
+      }
+
+      return UI();
+    });
+  }
+}
+

+ 29 - 0
gmus-mobile/lib/components/identify.dart

@@ -0,0 +1,29 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../controller.dart';
+import '../socket.dart' as socket;
+
+class Identify extends StatelessWidget {
+  final Controller controller = Get.find();
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      children: [
+        TextField(
+            onChanged: controller.setName,
+            decoration: InputDecoration(
+                border: InputBorder.none,
+                hintText: 'Set name',
+              ),
+        ),
+        TextButton(
+            child: Text('Connect'),
+            onPressed: () {
+              socket.connect(controller);
+            },
+        ),
+      ],
+    );
+  }
+}

+ 26 - 0
gmus-mobile/lib/components/player.dart

@@ -0,0 +1,26 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../controller.dart';
+
+class GmusPlayer extends StatelessWidget {
+  final Controller controller = Get.find();
+  @override
+  Widget build(BuildContext context) {
+    return Obx(() {
+      bool isPlaying = controller.player.value.playing;
+
+      String playPauseButtonText = isPlaying ? 'Pause' : 'Play';
+
+      return Row(
+        children: [
+          TextButton(
+              child: Text(playPauseButtonText),
+              onPressed: controller.playPause,
+          ),
+        ],
+      );
+    });
+  }
+}
+

+ 106 - 0
gmus-mobile/lib/components/songs.dart

@@ -0,0 +1,106 @@
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+import 'package:http/http.dart' as http;
+
+import '../config.dart';
+import '../types/song.dart';
+
+import './spinner.dart';
+
+class Songs extends StatefulWidget {
+  final String artist;
+  final String album;
+  final void Function(int) onSelect;
+
+  Songs({
+    @required this.artist, // can be an empty string
+    @required this.album, // can be an empty string
+    @required this.onSelect,
+  });
+
+  @override
+  _SongsWidgetState createState() => _SongsWidgetState(
+      artist: this.artist,
+      album: this.album,
+      onSelect: this.onSelect,
+    );
+}
+
+Future<List<Song>> fetchSongs(String artist) async {
+  final response = await http.get(Uri.https(config['apiUrl'], '/songs', {
+    'artist': artist,
+  }));
+
+  if (response.statusCode != 200) {
+    throw Exception('Failed to load songs');
+  }
+
+  List<Song> songs = [];
+  var responseJson = jsonDecode(response.body)['songs'];
+  for (var i = 0; i < responseJson.length; i++) {
+    songs.add(Song.fromJson(responseJson[i]));
+  }
+  return songs;
+}
+
+class _SongsWidgetState extends State<Songs> {
+  final String artist;
+  final String album;
+  Future<List<Song>> songs;
+
+  final void Function(int) onSelect;
+
+  _SongsWidgetState({
+    @required this.artist,
+    @required this.album,
+    @required this.onSelect,
+  });
+
+  @override
+  void initState() {
+    super.initState();
+    songs = fetchSongs(this.artist);
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return FutureBuilder<List<Song>>(
+      future: songs,
+      builder: (context, snapshot) {
+        if (snapshot.hasData) {
+          var filteredAlbums = this.album == null
+            ? snapshot.data
+            : snapshot.data.where((song) => song.album == this.album);
+
+          return ListView(
+            padding: EdgeInsets.only(left: 8, right: 8),
+            children: filteredAlbums.map<Widget>((song) => Container(
+              height: 40,
+              color: Colors.white,
+              child: Align(
+                alignment: Alignment.centerLeft,
+                child: TextButton(
+                  child: Text("${song.track} - ${song.title.length == 0 ? 'Untitled Track' : song.title}"),
+                  onPressed: () {
+                    onSelect(song.id);
+                  },
+                  style: TextButton.styleFrom(
+                    textStyle: TextStyle(fontSize: 18, fontStyle: FontStyle.normal),
+                    primary: Colors.black,
+                  ),
+                ),
+              ),
+            )).toList(),
+          );
+        }
+        if (snapshot.hasError) {
+          return Text("${snapshot.error}");
+        }
+
+        return CenterSpinner();
+      },
+    );
+  }
+}

+ 15 - 0
gmus-mobile/lib/components/spinner.dart

@@ -0,0 +1,15 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+
+class CenterSpinner extends StatelessWidget {
+  @override
+  Widget build(BuildContext context) {
+    return Center(
+      child: SizedBox(
+        child: CircularProgressIndicator(),
+        height: 64,
+        width: 64,
+      ),
+    );
+  }
+}

+ 32 - 0
gmus-mobile/lib/components/status.dart

@@ -0,0 +1,32 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../controller.dart';
+
+class StatusBarWrapped extends StatelessWidget {
+  final Controller controller;
+  StatusBarWrapped({
+    @required this.controller,
+  });
+  @override
+  Widget build(BuildContext context) {
+    return Obx(() {
+      var uniqueName = controller.uniqueName.value;
+      if (uniqueName.length == 0) {
+        return Text("Disconnected");
+      }
+
+      return Center(
+        child: Text("Connected | ${controller.uniqueName}"),
+      );
+    });
+  }
+}
+
+class StatusBar extends StatelessWidget {
+  final Controller controller = Get.find();
+  @override
+  Widget build(BuildContext context) {
+    return StatusBarWrapped(controller: this.controller);
+  }
+}

+ 21 - 0
gmus-mobile/lib/components/ui.dart

@@ -0,0 +1,21 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import '../controller.dart';
+
+import './browser.dart';
+import './player.dart';
+
+// Main UI once identified
+class UI extends StatelessWidget {
+  final Controller controller = Get.find();
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      children: [
+        Expanded(child: Browser()),
+        GmusPlayer(),
+      ],
+    );
+  }
+}

+ 6 - 0
gmus-mobile/lib/config.dart

@@ -0,0 +1,6 @@
+import 'package:flutter_dotenv/flutter_dotenv.dart';
+
+final config = {
+  'isDevelopment': env['DART_ENV'] == 'development',
+  'apiUrl': env['API_URL'] ?? 'http://localhost:3000',
+};

+ 128 - 0
gmus-mobile/lib/controller.dart

@@ -0,0 +1,128 @@
+import 'dart:convert';
+
+import 'package:get/get.dart';
+import 'package:web_socket_channel/io.dart';
+
+import './actions.dart' as actions;
+
+class Player {
+  double currentTime = 0;
+  double seekTime = -1;
+  String master;
+  int songId;
+  bool playing = false;
+  List<int> queue = [];
+
+  Map<String, dynamic> stringify() {
+    return {
+      'currentTime': this.currentTime,
+      'seekTime': this.seekTime,
+      'master': this.master,
+      'songId': this.songId,
+      'playing': this.playing,
+      'queue': this.queue,
+    };
+  }
+}
+
+class Client {
+  String name;
+  int lastPing;
+
+  Client(String name, int lastPing) {
+    this.name = name;
+    this.lastPing = lastPing;
+  }
+}
+
+class Controller extends GetxController {
+  RxString name = ''.obs;
+  RxString uniqueName = ''.obs;
+
+  IOWebSocketChannel channel;
+
+  Rx<Player> player = new Player().obs;
+  RxList<Client> clients;
+
+  setName(String newName) {
+    name.value = newName;
+  }
+  setUniqueName(String newUniqueName) {
+    uniqueName.value = newUniqueName;
+  }
+
+  onRemoteMessage(String message) {
+    var action = jsonDecode(message);
+    switch (action['type']) {
+      case actions.CLIENT_LIST_UPDATED:
+        var payload = action['payload'];
+
+        List<Client> clientList = [];
+        for (var i = 0; i < payload.length; i++) {
+          clientList.add(new Client(
+            payload[i]['name'],
+            payload[i]['lastPing'],
+          ));
+        }
+
+        this.clients = clientList.obs;
+
+        break;
+
+      case actions.STATE_SET:
+        Player nextPlayer = new Player();
+
+        nextPlayer.currentTime = action['payload']['currentTime'].toDouble();
+        nextPlayer.seekTime = action['payload']['seekTime'].toDouble();
+        nextPlayer.master = action['payload']['master'];
+        nextPlayer.songId = action['payload']['songId'];
+        nextPlayer.playing = action['payload']['playing'];
+
+        nextPlayer.queue = [];
+        for (var i = 0; i < action['payload']['queue'].length; i++) {
+          nextPlayer.queue.add(action['payload']['queue'][i]);
+        }
+
+        this.player.value = nextPlayer;
+
+        break;
+    }
+  }
+
+  void _remoteDispatch(String action) {
+    if (this.channel == null) {
+      return;
+    }
+
+    this.channel.sink.add(action);
+  }
+
+  bool _isMaster() => this.uniqueName.value == this.player.value.master;
+
+  void playPause() {
+    this.player.value.playing = !this.player.value.playing;
+
+    if (!this._isMaster()) {
+      this._remoteDispatch(jsonEncode({
+        'type': actions.STATE_SET,
+        'payload': this.player.value.stringify(),
+      }));
+    }
+  }
+
+  void playSong(int songId) {
+    if (this._isMaster()) {
+      throw Exception('Playing songs on mobile not yet implemented!');
+    }
+
+    this.player.value.songId = songId;
+    this.player.value.currentTime = 0;
+    this.player.value.seekTime = -1;
+    this.player.value.playing = true;
+
+    this._remoteDispatch(jsonEncode({
+      'type': actions.STATE_SET,
+      'payload': this.player.value.stringify(),
+    }));
+  }
+}

+ 53 - 0
gmus-mobile/lib/main.dart

@@ -0,0 +1,53 @@
+import 'dart:io';
+
+import 'package:flutter_dotenv/flutter_dotenv.dart' as DotEnv;
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+import './config.dart';
+import './controller.dart';
+
+import './components/content.dart';
+import './components/status.dart';
+
+class Gmus extends StatelessWidget {
+  @override
+  Widget build(BuildContext context) {
+    Get.put(Controller());
+
+    return Scaffold(
+      appBar: AppBar(
+          title: Text('gmus'),
+        ),
+      body: Container(
+          child: Column(
+              children: [
+                Expanded(
+                  child: Content(),
+                ),
+                StatusBar(),
+              ],
+          ),
+        ),
+      );
+  }
+}
+
+class MyHttpOverrides extends HttpOverrides {
+  @override
+  HttpClient createHttpClient(SecurityContext context) {
+    return super.createHttpClient(context)
+        ..badCertificateCallback =
+          (X509Certificate cert, String host, int port) => true;
+  }
+}
+
+Future<void> main() async {
+  await DotEnv.load(fileName: '.env');
+
+  if (config['isDevelopment']) {
+    HttpOverrides.global = new MyHttpOverrides();
+  }
+
+  runApp(GetMaterialApp(home: Gmus()));
+}

+ 46 - 0
gmus-mobile/lib/socket.dart

@@ -0,0 +1,46 @@
+import 'dart:convert';
+
+import 'package:nanoid/nanoid.dart';
+import 'package:web_socket_channel/io.dart';
+
+import './config.dart';
+import './controller.dart';
+
+String getWebSocketUrl() {
+  return "wss://${config['apiUrl']}/pubsub";
+}
+
+String getUniqueName(String name) {
+  return "$name-${nanoid(5)}";
+}
+
+const socketKeepaliveTimeoutMs = 20000;
+
+Future keepalive(IOWebSocketChannel channel) {
+  return new Future.delayed(const Duration(milliseconds: socketKeepaliveTimeoutMs), () {
+    channel.sink.add(jsonEncode({'type': 'PING'}));
+
+    keepalive(channel);
+  });
+}
+
+void connect(Controller controller) async {
+  if (controller.name.value.length == 0) {
+    return;
+  }
+
+  final String uniqueName = getUniqueName(controller.name.value);
+  controller.setUniqueName(uniqueName);
+
+  final String webSocketUrl = getWebSocketUrl();
+  final String pubsubUrl = "$webSocketUrl?client-name=$uniqueName";
+
+  var channel = IOWebSocketChannel.connect(Uri.parse(pubsubUrl));
+  controller.channel = channel;
+
+  channel.stream.listen((message) {
+    controller.onRemoteMessage(message);
+  });
+
+  keepalive(channel);
+}

+ 21 - 0
gmus-mobile/lib/types/song.dart

@@ -0,0 +1,21 @@
+class Song {
+  int id;
+  int track;
+  String title;
+  String artist;
+  String album;
+  int time;
+
+  Song({this.id, this.track, this.title, this.artist, this.album, this.time});
+
+  factory Song.fromJson(Map<String, dynamic> json) {
+    return Song(
+        id: json['id'],
+        track: json['track'],
+        title: json['title'],
+        artist: json['artist'],
+        album: json['album'],
+        time: json['time'],
+      );
+  }
+}

+ 349 - 0
gmus-mobile/pubspec.lock

@@ -0,0 +1,349 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+  _fe_analyzer_shared:
+    dependency: transitive
+    description:
+      name: _fe_analyzer_shared
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "14.0.0"
+  analyzer:
+    dependency: transitive
+    description:
+      name: analyzer
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.41.2"
+  args:
+    dependency: transitive
+    description:
+      name: args
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.0"
+  async:
+    dependency: transitive
+    description:
+      name: async
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.5.0"
+  boolean_selector:
+    dependency: transitive
+    description:
+      name: boolean_selector
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.0"
+  build:
+    dependency: transitive
+    description:
+      name: build
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.6.2"
+  built_collection:
+    dependency: transitive
+    description:
+      name: built_collection
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "5.0.0"
+  built_value:
+    dependency: transitive
+    description:
+      name: built_value
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "8.0.0"
+  characters:
+    dependency: transitive
+    description:
+      name: characters
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.1.0"
+  charcode:
+    dependency: transitive
+    description:
+      name: charcode
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.2.0"
+  cli_util:
+    dependency: transitive
+    description:
+      name: cli_util
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.3.0"
+  clock:
+    dependency: transitive
+    description:
+      name: clock
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.1.0"
+  code_builder:
+    dependency: transitive
+    description:
+      name: code_builder
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.6.0"
+  collection:
+    dependency: transitive
+    description:
+      name: collection
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.15.0"
+  convert:
+    dependency: transitive
+    description:
+      name: convert
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.1"
+  crypto:
+    dependency: transitive
+    description:
+      name: crypto
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.5"
+  cupertino_icons:
+    dependency: "direct main"
+    description:
+      name: cupertino_icons
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.0.0"
+  dart_style:
+    dependency: transitive
+    description:
+      name: dart_style
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.3.12"
+  fake_async:
+    dependency: transitive
+    description:
+      name: fake_async
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.2.0"
+  file:
+    dependency: transitive
+    description:
+      name: file
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "6.0.0"
+  fixnum:
+    dependency: transitive
+    description:
+      name: fixnum
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.0.0"
+  flutter:
+    dependency: "direct main"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_dotenv:
+    dependency: "direct main"
+    description:
+      name: flutter_dotenv
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.1.0"
+  flutter_test:
+    dependency: "direct dev"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  get:
+    dependency: "direct main"
+    description:
+      name: get
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.25.4"
+  glob:
+    dependency: transitive
+    description:
+      name: glob
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.0"
+  http:
+    dependency: "direct main"
+    description:
+      name: http
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.13.0"
+  http_parser:
+    dependency: transitive
+    description:
+      name: http_parser
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "4.0.0"
+  logging:
+    dependency: transitive
+    description:
+      name: logging
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.0.0"
+  matcher:
+    dependency: transitive
+    description:
+      name: matcher
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.12.10"
+  meta:
+    dependency: transitive
+    description:
+      name: meta
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.3.0"
+  mockito:
+    dependency: "direct main"
+    description:
+      name: mockito
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "4.1.4"
+  nanoid:
+    dependency: "direct main"
+    description:
+      name: nanoid
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.1.0"
+  package_config:
+    dependency: transitive
+    description:
+      name: package_config
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.9.3"
+  path:
+    dependency: transitive
+    description:
+      name: path
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.8.0"
+  pedantic:
+    dependency: transitive
+    description:
+      name: pedantic
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.10.0"
+  pub_semver:
+    dependency: transitive
+    description:
+      name: pub_semver
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.0"
+  sky_engine:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.99"
+  source_gen:
+    dependency: transitive
+    description:
+      name: source_gen
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.9.10+2"
+  source_span:
+    dependency: transitive
+    description:
+      name: source_span
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.8.0"
+  stack_trace:
+    dependency: transitive
+    description:
+      name: stack_trace
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.10.0"
+  stream_channel:
+    dependency: transitive
+    description:
+      name: stream_channel
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.0"
+  string_scanner:
+    dependency: transitive
+    description:
+      name: string_scanner
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.1.0"
+  term_glyph:
+    dependency: transitive
+    description:
+      name: term_glyph
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.2.0"
+  test_api:
+    dependency: transitive
+    description:
+      name: test_api
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.2.19"
+  typed_data:
+    dependency: transitive
+    description:
+      name: typed_data
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.3.0"
+  vector_math:
+    dependency: transitive
+    description:
+      name: vector_math
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.0"
+  watcher:
+    dependency: transitive
+    description:
+      name: watcher
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.0.0"
+  web_socket_channel:
+    dependency: "direct main"
+    description:
+      name: web_socket_channel
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.2.0"
+  yaml:
+    dependency: transitive
+    description:
+      name: yaml
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.0.0"
+sdks:
+  dart: ">=2.12.0-0.0 <3.0.0"

+ 79 - 0
gmus-mobile/pubspec.yaml

@@ -0,0 +1,79 @@
+name: gmus_mobile
+description: Mobile client for go-music-player.
+
+# The following line prevents the package from being accidentally published to
+# pub.dev using `pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+# The following defines the version and build number for your application.
+# A version number is three numbers separated by dots, like 1.2.43
+# followed by an optional build number separated by a +.
+# Both the version and the builder number may be overridden in flutter
+# build by specifying --build-name and --build-number, respectively.
+# In Android, build-name is used as versionName while build-number used as versionCode.
+# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
+# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
+# Read more about iOS versioning at
+# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
+version: 1.0.0+1
+
+environment:
+  sdk: ">=2.7.0 <3.0.0"
+
+dependencies:
+  cupertino_icons: ^1.0.0
+  flutter:
+    sdk: flutter
+  flutter_dotenv:
+  get:
+  http:
+  mockito:
+  nanoid:
+  web_socket_channel:
+
+dev_dependencies:
+  flutter_test:
+    sdk: flutter
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter.
+flutter:
+
+  # The following line ensures that the Material Icons font is
+  # included with your application, so that you can use the icons in
+  # the material Icons class.
+  uses-material-design: true
+
+  # To add assets to your application, add an assets section, like this:
+  assets:
+    - .env
+  #   - images/a_dot_burr.jpeg
+  #   - images/a_dot_ham.jpeg
+
+  # An image asset can refer to one or more resolution-specific "variants", see
+  # https://flutter.dev/assets-and-images/#resolution-aware.
+
+  # For details regarding adding assets from package dependencies, see
+  # https://flutter.dev/assets-and-images/#from-packages
+
+  # To add custom fonts to your application, add a fonts section here,
+  # in this "flutter" section. Each entry in this list should have a
+  # "family" key with the font family name, and a "fonts" key with a
+  # list giving the asset and other descriptors for the font. For
+  # example:
+  # fonts:
+  #   - family: Schyler
+  #     fonts:
+  #       - asset: fonts/Schyler-Regular.ttf
+  #       - asset: fonts/Schyler-Italic.ttf
+  #         style: italic
+  #   - family: Trajan Pro
+  #     fonts:
+  #       - asset: fonts/TrajanPro.ttf
+  #       - asset: fonts/TrajanPro_Bold.ttf
+  #         weight: 700
+  #
+  # For details regarding fonts from package dependencies,
+  # see https://flutter.dev/custom-fonts/#from-packages

+ 41 - 0
gmus-mobile/test/components/status_test.dart

@@ -0,0 +1,41 @@
+import 'package:flutter/widgets.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:get/get.dart';
+
+import 'package:gmus_mobile/components/status.dart';
+import 'package:gmus_mobile/controller.dart';
+
+class TestStatusBar extends StatelessWidget {
+  final Controller controller;
+  TestStatusBar({
+    @required this.controller,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    Get.put(this.controller);
+
+    return Directionality(
+      textDirection: TextDirection.ltr,
+      child: StatusBarWrapped(controller: this.controller),
+    );
+  }
+}
+
+void main() {
+  testWidgets('Status bar should render a disconnected message', (WidgetTester tester) async {
+    await tester.pumpWidget(TestStatusBar(controller: Controller()));
+
+    expect(find.text('Disconnected'), findsOneWidget);
+  });
+
+  testWidgets('Status bar should render a connected message with name', (WidgetTester tester) async {
+    Controller controller = Controller();
+    controller.setUniqueName('mob-DvaU1');
+
+    await tester.pumpWidget(TestStatusBar(controller: controller));
+
+    expect(find.textContaining('Connected'), findsOneWidget);
+    expect(find.textContaining('mob-DvaU1'), findsOneWidget);
+  });
+}

+ 140 - 0
gmus-mobile/test/controller_test.dart

@@ -0,0 +1,140 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:gmus_mobile/actions.dart';
+import 'package:gmus_mobile/controller.dart';
+import 'package:mockito/mockito.dart';
+import 'package:web_socket_channel/io.dart';
+import 'package:web_socket_channel/web_socket_channel.dart';
+
+void main() {
+  group('Controller', () {
+    group('Receiving messages from pubsub', () {
+      group(CLIENT_LIST_UPDATED, () {
+        String message = '{"type":"CLIENT_LIST_UPDATED","payload":[{"name":"client-A","lastPing":123},{"name":"client-B","lastPing":456}]}';
+
+        test('client list should be updated', () {
+          Controller controller = Controller();
+
+          controller.onRemoteMessage(message);
+
+          expect(controller.clients.length, 2);
+
+          expect(controller.clients[0].name, 'client-A');
+          expect(controller.clients[0].lastPing, 123);
+
+          expect(controller.clients[1].name, 'client-B');
+          expect(controller.clients[1].lastPing, 456);
+        });
+      });
+
+      group(STATE_SET, () {
+        String message = '{"type":"STATE_SET","payload":{"master":"new-master-client","songId":7123,"currentTime":10.843,"seekTime":23.001,"playing":false,"queue":[9750]}}';
+
+        test('player state should be updated', () {
+          Controller controller = Controller();
+          controller.onRemoteMessage(message);
+
+          expect(controller.player.value.master, 'new-master-client');
+          expect(controller.player.value.songId, 7123);
+          expect(controller.player.value.currentTime, 10.843);
+          expect(controller.player.value.seekTime, 23.001);
+          expect(controller.player.value.playing, false);
+        });
+
+        test('queue should be updated', () {
+          Controller controller = Controller();
+          controller.onRemoteMessage(message);
+
+          expect(controller.player.value.queue.length, 1);
+          expect(controller.player.value.queue[0], 9750);
+        });
+      });
+    });
+
+    group('Play / pause', () {
+      group('When slave', () {
+        group('when paused', () {
+          test('should send a "play" action to pubsub', () {
+            var controller = mockControllerAsSlave();
+            controller.player.value.playing = false;
+
+            controller.playPause();
+
+            verify(controller.channel.sink.add('{"type":"STATE_SET","payload":{"currentTime":0.0,"seekTime":-1.0,"master":"other-client-name-master","songId":null,"playing":true,"queue":[]}}')).called(1);
+          });
+        });
+
+        group('when playing', () {
+          test('should send a "pause" action to pubsub', () {
+            var controller = mockControllerAsSlave();
+            controller.player.value.playing = true;
+            controller.player.value.songId = 182;
+
+            controller.playPause();
+
+            verify(controller.channel.sink.add('{"type":"STATE_SET","payload":{"currentTime":0.0,"seekTime":-1.0,"master":"other-client-name-master","songId":182,"playing":false,"queue":[]}}')).called(1);
+          });
+        });
+      });
+
+      group('When master', () {
+        test('should not send any actions to pubsub', () {
+          var controller = mockControllerAsMaster();
+          controller.player.value.playing = false;
+          controller.playPause();
+
+          verifyNever(controller.channel.sink.add('{"type":"STATE_SET","payload":{"currentTime":0.0,"seekTime":-1.0,"master":"other-client-name-master","songId":null,"playing":true,"queue":[]}}'));
+        });
+      });
+    });
+
+    group('Playing a song', () {
+      group('When slave', () {
+        test('should send an action to pubsub to play the song', () {
+          var controller = mockControllerAsSlave();
+
+          controller.playSong(871);
+
+          verify(controller.channel.sink.add('{"type":"STATE_SET","payload":{"currentTime":0.0,"seekTime":-1.0,"master":"other-client-name-master","songId":871,"playing":true,"queue":[]}}')).called(1);
+        });
+      });
+
+      group('When master', () {
+        test('should throw an error', () {
+          var controller = mockControllerAsMaster();
+
+          expect(() => controller.playSong(871), throwsException);
+        });
+      });
+    });
+  });
+}
+
+class MockWebSocketSink extends Mock implements WebSocketSink {}
+
+class MockChannel extends Mock implements IOWebSocketChannel {
+  final WebSocketSink sink;
+  MockChannel({
+    this.sink,
+  });
+}
+
+Controller mockControllerAsMaster() {
+  Controller controllerAsMaster = Controller();
+  controllerAsMaster.setUniqueName('my-client-name-master');
+  controllerAsMaster.player.value.master = 'my-client-name-master';
+
+  controllerAsMaster.channel = MockChannel(sink: MockWebSocketSink());
+
+  return controllerAsMaster;
+}
+
+Controller mockControllerAsSlave() {
+  Controller controllerAsSlave = Controller();
+  controllerAsSlave.setUniqueName('my-client-name-slave');
+  controllerAsSlave.player.value.master = 'other-client-name-master';
+
+  controllerAsSlave.channel = MockChannel(sink: MockWebSocketSink());
+
+  return controllerAsSlave;
+}
+