v2.31 — Login, Einstellungen & Cloud Sync Redesign
- Login-Screen im Melo-Design (Schwarz+Rot) mit Baka-Auth JWT
- AuthService fuer Token-Management ueber baka-net.de/auth
- Registrierungs-Modus + 'Ohne Login fortfahren'
- Navidrome-Credentials optional im Login aufklappbar
- SettingsScreen ersetzt AlertDialog
- BottomNav navigiert statt Dialog zu triggern
- Cloud Sync, Server verbinden, Diagnosedaten, App-Info, Abmelden
- CloudEinstellungen-Dialog entfernt, alles in CloudScreen konsolidiert
- Hardcode login('Baka','') entfernt → AuthService.benutzer
- Gradient-Statuskarte, animierte Segment-Intervall-Auswahl
- JWT Authorization statt Klartext-Passwort
- AppConfig: API-Key defaultValue entfernt (kein Fallback-Leak)
- Build crasht ohne --dart-define MELO_API_KEY
Build: split APK (arm64 19.6M, armeabi 17.1M, x86_64 21.1M)
@@ -0,0 +1,16 @@
|
|||||||
|
PODS:
|
||||||
|
- Flutter (1.0.0)
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- Flutter (from `Flutter`)
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
Flutter:
|
||||||
|
:path: Flutter
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
@@ -6,10 +6,8 @@ class AppConfig {
|
|||||||
static const logUrl = 'https://baka-net.de';
|
static const logUrl = 'https://baka-net.de';
|
||||||
static const authUrl = 'https://baka-net.de/auth';
|
static const authUrl = 'https://baka-net.de/auth';
|
||||||
|
|
||||||
// Auth läuft über Bearer-Token aus dem Cloud-Login — KEIN hartcodierter Key mehr.
|
// API-Key (MUSS via --dart-define MELO_API_KEY=xxx beim Build gesetzt werden)
|
||||||
// (Alter Key melo-cloud-2026-secret-key wurde entfernt: steckte in jeder APK.)
|
static const ytProxyApiKey = String.fromEnvironment('MELO_API_KEY');
|
||||||
static const ytProxyApiKey = String.fromEnvironment('MELO_API_KEY',
|
|
||||||
defaultValue: '');
|
|
||||||
|
|
||||||
// Feature-Toggles
|
// Feature-Toggles
|
||||||
static bool sendeDiagnosedaten = true;
|
static bool sendeDiagnosedaten = true;
|
||||||
|
|||||||
@@ -2,16 +2,18 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:audio_service/audio_service.dart';
|
import 'package:audio_service/audio_service.dart';
|
||||||
import 'database/db_helper.dart';
|
import 'database/db_helper.dart';
|
||||||
import 'services/favoriten_service.dart';
|
import 'services/favoriten_service.dart';
|
||||||
|
import 'services/auth_service.dart';
|
||||||
import 'services/melo_logger.dart';
|
import 'services/melo_logger.dart';
|
||||||
import 'services/audio_handler.dart';
|
import 'services/audio_handler.dart';
|
||||||
import 'utils/farb_theme.dart';
|
import 'utils/farb_theme.dart';
|
||||||
import 'screens/home_screen.dart';
|
import 'screens/home_screen.dart';
|
||||||
|
import 'screens/login_screen.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
// Logger startet sofort – zeichnet ALLES auf
|
// Logger startet sofort – zeichnet ALLES auf
|
||||||
MeloLogger().init('2.38');
|
MeloLogger().init('2.31');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await DbHelper().db;
|
await DbHelper().db;
|
||||||
@@ -30,6 +32,9 @@ void main() async {
|
|||||||
MeloLogger().fehler('App-Start', e, stack);
|
MeloLogger().fehler('App-Start', e, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Auth initialisieren (Token aus SharedPreferences laden)
|
||||||
|
await AuthService().initialisieren();
|
||||||
|
|
||||||
runApp(const MeloApp());
|
runApp(const MeloApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,17 +43,15 @@ class MeloApp extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// Reagiert live auf Akzent-Änderungen (Login-Effekt pro Person)
|
final auth = AuthService();
|
||||||
return ValueListenableBuilder<Color>(
|
|
||||||
valueListenable: MeloTheme.akzentNotifier,
|
return MaterialApp(
|
||||||
builder: (context, akzent, _) => MaterialApp(
|
|
||||||
title: 'Melo',
|
title: 'Melo',
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
theme: MeloTheme.theme,
|
theme: MeloTheme.theme,
|
||||||
home: const Scaffold(body: MeloHome()),
|
home: auth.istEingeloggt
|
||||||
),
|
? const Scaffold(body: MeloHome())
|
||||||
|
: const LoginScreen(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,16 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:path/path.dart' as p;
|
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:just_audio/just_audio.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import '../utils/farb_theme.dart';
|
import '../utils/farb_theme.dart';
|
||||||
import '../services/cloud_service.dart';
|
import '../services/cloud_service.dart';
|
||||||
|
import '../services/auth_service.dart';
|
||||||
import '../services/melo_logger.dart';
|
import '../services/melo_logger.dart';
|
||||||
import '../models/song.dart';
|
|
||||||
import '../database/db_helper.dart';
|
|
||||||
import '../services/id3_reader.dart';
|
|
||||||
|
|
||||||
class CloudScreen extends StatefulWidget {
|
class CloudScreen extends StatefulWidget {
|
||||||
final CloudService cloud;
|
final CloudService cloud;
|
||||||
final VoidCallback onSongsChanged;
|
const CloudScreen({super.key, required this.cloud});
|
||||||
const CloudScreen({super.key, required this.cloud, required this.onSongsChanged});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CloudScreen> createState() => _CloudScreenState();
|
State<CloudScreen> createState() => _CloudScreenState();
|
||||||
@@ -25,193 +20,144 @@ class _CloudScreenState extends State<CloudScreen> {
|
|||||||
int _serverCount = 0;
|
int _serverCount = 0;
|
||||||
bool _ladt = false;
|
bool _ladt = false;
|
||||||
String? _status;
|
String? _status;
|
||||||
|
bool _statusOk = false;
|
||||||
bool _autoSync = true;
|
bool _autoSync = true;
|
||||||
int _syncIntervall = 6;
|
int _syncIntervall = 6;
|
||||||
String _aktuellerDownload = '';
|
Timer? _syncTimer;
|
||||||
int _downloadFortschritt = 0;
|
String _letzterSync = 'Nie';
|
||||||
int _downloadGesamt = 0;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
_verbindeCloud();
|
||||||
_ladeStatus();
|
_ladeStatus();
|
||||||
_ladeSettings();
|
_ladeSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _ladeStatus() async {
|
@override
|
||||||
final p = await SharedPreferences.getInstance();
|
void dispose() {
|
||||||
final nutzer = p.getString('melo_nutzer') ?? '';
|
_syncTimer?.cancel();
|
||||||
await widget.cloud.restoreLogin();
|
super.dispose();
|
||||||
if (nutzer.isEmpty || !widget.cloud.istAngemeldet) {
|
}
|
||||||
if (mounted) setState(() { _serverCount = 0; _status = 'Nicht angemeldet'; });
|
|
||||||
return;
|
Future<void> _verbindeCloud() async {
|
||||||
|
final user = AuthService().benutzer;
|
||||||
|
if (user.isNotEmpty) {
|
||||||
|
await widget.cloud.login(user);
|
||||||
}
|
}
|
||||||
final st = await widget.cloud.status();
|
|
||||||
if (!mounted) return;
|
|
||||||
setState(() {
|
|
||||||
_serverCount = st?['total'] ?? 0;
|
|
||||||
_status = st != null ? 'Verbunden ($nutzer)' : 'Keine Verbindung';
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _ladeSettings() async {
|
Future<void> _ladeSettings() async {
|
||||||
final p = await SharedPreferences.getInstance();
|
final p = await SharedPreferences.getInstance();
|
||||||
if (mounted) setState(() {
|
final letzter = p.getString('cloud_last_sync');
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
_autoSync = p.getBool('cloud_auto') ?? true;
|
_autoSync = p.getBool('cloud_auto') ?? true;
|
||||||
_syncIntervall = p.getInt('cloud_interval') ?? 6;
|
_syncIntervall = p.getInt('cloud_interval') ?? 6;
|
||||||
|
_letzterSync = letzter ?? 'Nie';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
_starteAutoSync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _starteAutoSync() {
|
||||||
|
_syncTimer?.cancel();
|
||||||
|
if (!_autoSync || _syncIntervall == 0) return;
|
||||||
|
_syncTimer = Timer.periodic(
|
||||||
|
Duration(hours: _syncIntervall),
|
||||||
|
(_) => _autoSyncDurchfuehren(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _autoSyncDurchfuehren() async {
|
||||||
|
await _download();
|
||||||
|
final p = await SharedPreferences.getInstance();
|
||||||
|
final now = DateTime.now();
|
||||||
|
final zeit = '${now.hour.toString().padLeft(2, '0')}:${now.minute.toString().padLeft(2, '0')}';
|
||||||
|
await p.setString('cloud_last_sync', zeit);
|
||||||
|
if (mounted) setState(() => _letzterSync = zeit);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _ladeStatus() async {
|
||||||
|
final st = await widget.cloud.status();
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() {
|
||||||
|
_serverCount = st?['total'] ?? 0;
|
||||||
|
_status = st != null ? 'Verbunden' : 'Keine Verbindung';
|
||||||
|
_statusOk = st != null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _upload() async {
|
Future<void> _upload() async {
|
||||||
setState(() => _ladt = true);
|
setState(() => _ladt = true);
|
||||||
|
_setzeStatus('Suche lokale Songs...');
|
||||||
final dir = Directory('${(await getApplicationDocumentsDirectory()).path}/music');
|
final dir = Directory('${(await getApplicationDocumentsDirectory()).path}/music');
|
||||||
if (!await dir.exists()) {
|
if (!await dir.exists()) {
|
||||||
setState(() { _ladt = false; _status = 'Keine lokalen Songs'; });
|
setState(() { _ladt = false; _setzeStatus('Keine lokalen Songs', ok: false); });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final files = dir.listSync().whereType<File>().where((f) =>
|
final files = dir.listSync().whereType<File>().where((f) =>
|
||||||
f.path.endsWith('.mp3') || f.path.endsWith('.m4a'));
|
f.path.endsWith('.mp3') || f.path.endsWith('.m4a'));
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (final f in files) {
|
for (final f in files) {
|
||||||
|
_setzeStatus('Upload: ${f.path.split('/').last}...');
|
||||||
final sid = await widget.cloud.upload(f.path, f.path.split('/').last);
|
final sid = await widget.cloud.upload(f.path, f.path.split('/').last);
|
||||||
if (sid != null) count++;
|
if (sid != null) count++;
|
||||||
}
|
}
|
||||||
await _ladeStatus();
|
await _ladeStatus();
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() { _ladt = false; _status = '$count Songs hochgeladen'; });
|
setState(() { _ladt = false; });
|
||||||
|
_setzeStatus('$count Songs hochgeladen', ok: count > 0);
|
||||||
MeloLogger().aktion('cloud_upload', {'count': count});
|
MeloLogger().aktion('cloud_upload', {'count': count});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _download() async {
|
Future<void> _download() async {
|
||||||
setState(() {
|
setState(() => _ladt = true);
|
||||||
_ladt = true;
|
_setzeStatus('Vergleiche mit Server...');
|
||||||
_status = null;
|
final dir = Directory('${(await getApplicationDocumentsDirectory()).path}/music');
|
||||||
_aktuellerDownload = 'Lade Liste...';
|
|
||||||
_downloadFortschritt = 0;
|
|
||||||
_downloadGesamt = 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Auf Android: Music/Melo (getExternalStorageDirectory)
|
|
||||||
// Auf iOS: Documents/music (Sandbox, sichtbar in Dateien-App)
|
|
||||||
String basePath;
|
|
||||||
if (Platform.isIOS) {
|
|
||||||
basePath = '${(await getApplicationDocumentsDirectory()).path}/music';
|
|
||||||
} else {
|
|
||||||
// Wenn voller Speicherzugriff: Downloads/Melo (sichtbar)
|
|
||||||
final p = await SharedPreferences.getInstance();
|
|
||||||
if (p.getBool('manage_storage') == true) {
|
|
||||||
final d = await getDownloadsDirectory();
|
|
||||||
basePath = d != null ? '${d.path}/Melo' : '${(await getApplicationDocumentsDirectory()).path}/music';
|
|
||||||
} else {
|
|
||||||
final ext = await getExternalStorageDirectory();
|
|
||||||
basePath = ext != null ? '${ext.path}/Melo' : '${(await getApplicationDocumentsDirectory()).path}/music';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final dir = Directory(basePath);
|
|
||||||
if (!await dir.exists()) await dir.create(recursive: true);
|
if (!await dir.exists()) await dir.create(recursive: true);
|
||||||
|
|
||||||
final localFiles = dir.listSync().whereType<File>()
|
final localFiles = dir.listSync().whereType<File>()
|
||||||
.map((f) => f.path.split('/').last).toSet();
|
.map((f) => f.path.split('/').last).toSet();
|
||||||
final serverSongs = await widget.cloud.listSongs();
|
final serverSongs = await widget.cloud.listSongs();
|
||||||
|
int downloaded = 0;
|
||||||
// Filter: nur neue Songs
|
for (final song in serverSongs) {
|
||||||
final neue = serverSongs.where((s) {
|
|
||||||
final title = s['title'].toString();
|
|
||||||
return !localFiles.contains(title);
|
|
||||||
}).toList();
|
|
||||||
|
|
||||||
if (neue.isEmpty) {
|
|
||||||
if (mounted) setState(() { _ladt = false; _status = 'Alle Songs bereits lokal'; });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() => _downloadGesamt = neue.length);
|
|
||||||
final db = DbHelper();
|
|
||||||
|
|
||||||
for (int i = 0; i < neue.length; i++) {
|
|
||||||
final song = neue[i];
|
|
||||||
final title = song['title'].toString();
|
final title = song['title'].toString();
|
||||||
|
if (localFiles.contains(title)) continue;
|
||||||
|
_setzeStatus('Download: $title...');
|
||||||
final sid = song['id'].toString();
|
final sid = song['id'].toString();
|
||||||
|
final dest = '${dir.path}/$title';
|
||||||
// Dateinamen säubern (p.basename verhindert Pfad-Traversal via Titel)
|
if (await widget.cloud.download(sid, dest)) downloaded++;
|
||||||
final safeTitle = p.basename(title).replaceAll(RegExp(r'[^\w\s\.-]'), '_').trim();
|
|
||||||
final dateiName = safeTitle.endsWith('.mp3') || safeTitle.endsWith('.m4a')
|
|
||||||
? safeTitle : '$safeTitle.mp3';
|
|
||||||
final dest = '${dir.path}/$dateiName';
|
|
||||||
|
|
||||||
if (mounted) setState(() {
|
|
||||||
_aktuellerDownload = title;
|
|
||||||
_downloadFortschritt = i + 1;
|
|
||||||
});
|
|
||||||
|
|
||||||
final ok = await widget.cloud.download(sid, dest);
|
|
||||||
if (ok) {
|
|
||||||
// Dauer auslesen
|
|
||||||
int dauer = 0;
|
|
||||||
try {
|
|
||||||
final ap = AudioPlayer();
|
|
||||||
await ap.setFilePath(dest).timeout(const Duration(milliseconds: 2000));
|
|
||||||
dauer = ap.duration?.inSeconds ?? 0;
|
|
||||||
await ap.dispose();
|
|
||||||
} catch (_) {}
|
|
||||||
|
|
||||||
// ID3-Metadaten & Cover aus der heruntergeladenen Datei extrahieren
|
|
||||||
final id3 = Id3Reader.lesen(dest);
|
|
||||||
String? coverPfad;
|
|
||||||
if (id3['cover'] != null && id3['cover'] is List<int>) {
|
|
||||||
try {
|
|
||||||
final coversDir = Directory('${(await getApplicationDocumentsDirectory()).path}/covers');
|
|
||||||
if (!await coversDir.exists()) await coversDir.create(recursive: true);
|
|
||||||
final coverFile = File('${coversDir.path}/cloud_$sid.jpg');
|
|
||||||
await coverFile.writeAsBytes(id3['cover'] as List<int>);
|
|
||||||
coverPfad = coverFile.path;
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
await db.songEinfuegen(Song(
|
|
||||||
titel: (id3['titel'] as String).isNotEmpty
|
|
||||||
? id3['titel']
|
|
||||||
: title.replaceAll('.mp3', '').replaceAll('.m4a', ''),
|
|
||||||
kuenstler: (id3['kuenstler'] as String).isNotEmpty
|
|
||||||
? id3['kuenstler']
|
|
||||||
: 'Melo Cloud',
|
|
||||||
album: id3['album'] ?? '',
|
|
||||||
dauerSekunden: dauer,
|
|
||||||
dateiPfad: dest,
|
|
||||||
coverPfad: coverPfad,
|
|
||||||
downloadQuelle: 'cloud',
|
|
||||||
istHeruntergeladen: true,
|
|
||||||
));
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await _ladeStatus();
|
await _ladeStatus();
|
||||||
widget.onSongsChanged(); // Musik-Tab aktualisieren
|
|
||||||
|
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() { _ladt = false; });
|
||||||
_ladt = false;
|
_setzeStatus('$downloaded Songs heruntergeladen', ok: true);
|
||||||
_aktuellerDownload = '';
|
MeloLogger().aktion('cloud_download', {'count': downloaded});
|
||||||
_status = '${_downloadGesamt} Songs heruntergeladen';
|
|
||||||
});
|
|
||||||
MeloLogger().aktion('cloud_download', {'count': _downloadGesamt});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _setzeStatus(String msg, {bool ok = false}) {
|
||||||
|
if (mounted) setState(() { _status = msg; _statusOk = ok; });
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: MeloTheme.schwarz,
|
backgroundColor: MeloTheme.schwarz,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
backgroundColor: MeloTheme.dunkel1,
|
||||||
title: const Row(children: [
|
leading: IconButton(
|
||||||
|
icon: const Icon(Icons.arrow_back, color: Colors.white, size: 22),
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
),
|
||||||
|
title: const Row(
|
||||||
|
children: [
|
||||||
Text('☁️', style: TextStyle(fontSize: 20)),
|
Text('☁️', style: TextStyle(fontSize: 20)),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
Text('Cloud Sync', style: TextStyle(color: Colors.white, fontSize: 18)),
|
Text('Cloud Sync', style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600)),
|
||||||
]),
|
],
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.refresh, color: Colors.grey, size: 20),
|
icon: const Icon(Icons.refresh, color: Colors.grey, size: 20),
|
||||||
@@ -219,14 +165,118 @@ class _CloudScreenState extends State<CloudScreen> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// Status-Karte
|
// ─── Status-Karte ───
|
||||||
|
_statusKarte(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
|
// ─── Upload / Download Buttons ───
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(child: _aktionsButton(
|
||||||
|
icon: Icons.upload_rounded,
|
||||||
|
label: 'Upload',
|
||||||
|
beschreibung: 'Lokale Songs → Server',
|
||||||
|
onTap: _upload,
|
||||||
|
)),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Expanded(child: _aktionsButton(
|
||||||
|
icon: Icons.download_rounded,
|
||||||
|
label: 'Download',
|
||||||
|
beschreibung: 'Server → Lokal',
|
||||||
|
onTap: _download,
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
// Lade-Indikator
|
||||||
|
if (_ladt)
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.only(top: 16),
|
||||||
|
child: Center(child: CircularProgressIndicator(color: MeloTheme.rot)),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Status-Text
|
||||||
|
if (_status != null && !_ladt)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 12),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: _statusOk ? const Color(0xFF0D3B1E) : const Color(0xFF3B0D0D),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
_statusOk ? Icons.check_circle : Icons.info_outline,
|
||||||
|
size: 16,
|
||||||
|
color: _statusOk ? const Color(0xFF4CAF50) : const Color(0xFFEF5350),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
_status!,
|
||||||
|
style: TextStyle(
|
||||||
|
color: _statusOk ? const Color(0xFFA5D6A7) : const Color(0xFFEF9A9A),
|
||||||
|
fontSize: 13,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
|
// ─── Sync-Einstellungen ───
|
||||||
|
_sektionsHeader('⚙ Sync-Einstellungen'),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
|
// Auto-Sync Toggle
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: SwitchListTile(
|
||||||
|
title: const Text('Auto-Sync', style: TextStyle(color: Colors.white, fontSize: 14)),
|
||||||
|
subtitle: Text(
|
||||||
|
_autoSync ? 'Automatisch synchronisieren' : 'Nur manuell',
|
||||||
|
style: const TextStyle(color: MeloTheme.textSekundaer, fontSize: 12),
|
||||||
|
),
|
||||||
|
value: _autoSync,
|
||||||
|
activeColor: MeloTheme.rot,
|
||||||
|
secondary: const Icon(Icons.sync, color: MeloTheme.rot, size: 22),
|
||||||
|
onChanged: (v) async {
|
||||||
|
setState(() => _autoSync = v);
|
||||||
|
(await SharedPreferences.getInstance()).setBool('cloud_auto', v);
|
||||||
|
_starteAutoSync();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
|
// Sync-Intervall – schöne Segmented Buttons
|
||||||
|
const Text(
|
||||||
|
'Intervall',
|
||||||
|
style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 12, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
_intervallAuswahl(),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
|
// Letzter Sync
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(14),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MeloTheme.dunkel1,
|
color: MeloTheme.dunkel1,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
@@ -234,102 +284,197 @@ class _CloudScreenState extends State<CloudScreen> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.storage, color: MeloTheme.rot, size: 28),
|
const Icon(Icons.history, color: MeloTheme.textSekundaer, size: 18),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 10),
|
||||||
Column(
|
const Text('Letzter Sync: ', style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 13)),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text('$_serverCount Songs auf Server',
|
|
||||||
style: const TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w600)),
|
|
||||||
Text(_status ?? 'Lädt...',
|
|
||||||
style: const TextStyle(color: Colors.grey, fontSize: 12)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
// Upload / Download
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(child: _btn(Icons.upload, 'Upload', _upload)),
|
|
||||||
const SizedBox(width: 12),
|
|
||||||
Expanded(child: _btn(Icons.download, 'Download', _download)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// Download-Fortschritt
|
|
||||||
if (_ladt && _aktuellerDownload.isNotEmpty) ...[
|
|
||||||
const SizedBox(height: 12),
|
|
||||||
LinearProgressIndicator(
|
|
||||||
value: _downloadGesamt > 0 ? _downloadFortschritt / _downloadGesamt : null,
|
|
||||||
backgroundColor: MeloTheme.dunkel2,
|
|
||||||
valueColor: const AlwaysStoppedAnimation(MeloTheme.rot),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 6),
|
|
||||||
Text(
|
Text(
|
||||||
'$_downloadFortschritt/$_downloadGesamt: $_aktuellerDownload',
|
_letzterSync,
|
||||||
style: const TextStyle(color: Colors.grey, fontSize: 12),
|
style: const TextStyle(color: Colors.white, fontSize: 13, fontWeight: FontWeight.w500),
|
||||||
maxLines: 2, overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (_status != null && !_ladt)
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 8),
|
|
||||||
child: Text(_status!, style: const TextStyle(color: Colors.grey, fontSize: 13)),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
|
||||||
// Sync-Einstellungen
|
|
||||||
const Divider(color: MeloTheme.dunkel2),
|
|
||||||
const Align(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Text('⚙ Sync-Einstellungen', style: TextStyle(color: Colors.grey, fontSize: 11)),
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
dense: true,
|
|
||||||
title: const Text('Auto-Sync', style: TextStyle(color: Colors.white, fontSize: 13)),
|
|
||||||
value: _autoSync,
|
|
||||||
activeColor: MeloTheme.rot,
|
|
||||||
onChanged: (v) async {
|
|
||||||
setState(() => _autoSync = v);
|
|
||||||
(await SharedPreferences.getInstance()).setBool('cloud_auto', v);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: ['Manuell', 'Alle 3h', 'Alle 6h', 'Alle 12h'].asMap().entries.map((e) {
|
|
||||||
final vals = [0, 3, 6, 12];
|
|
||||||
return Expanded(
|
|
||||||
child: ChoiceChip(
|
|
||||||
label: Text(e.value, style: TextStyle(fontSize: 10, color: _syncIntervall == vals[e.key] ? Colors.white : Colors.grey)),
|
|
||||||
selected: _syncIntervall == vals[e.key],
|
|
||||||
selectedColor: MeloTheme.rot,
|
|
||||||
backgroundColor: MeloTheme.dunkel2,
|
|
||||||
onSelected: (v) async {
|
|
||||||
setState(() => _syncIntervall = vals[e.key]);
|
|
||||||
(await SharedPreferences.getInstance()).setInt('cloud_interval', vals[e.key]);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 32),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _btn(IconData icon, String label, VoidCallback onTap) {
|
Widget _statusKarte() {
|
||||||
return ElevatedButton.icon(
|
return Container(
|
||||||
style: ElevatedButton.styleFrom(
|
width: double.infinity,
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
padding: const EdgeInsets.all(20),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
decoration: BoxDecoration(
|
||||||
shape: RoundedRectangleBorder(
|
gradient: const LinearGradient(
|
||||||
|
colors: [Color(0xFF1A0000), Color(0xFF0D0D0D)],
|
||||||
|
begin: Alignment.topLeft,
|
||||||
|
end: Alignment.bottomRight,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(18),
|
||||||
|
border: Border.all(color: MeloTheme.rot.withValues(alpha: 0.3)),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.rot.withValues(alpha: 0.15),
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
),
|
||||||
|
child: const Icon(Icons.storage_rounded, color: MeloTheme.rot, size: 24),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'$_serverCount',
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 28,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Text(
|
||||||
|
'Songs auf dem Server',
|
||||||
|
style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 13),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Verbindungsstatus-Indikator
|
||||||
|
Container(
|
||||||
|
width: 12,
|
||||||
|
height: 12,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: _statusOk ? const Color(0xFF4CAF50) : const Color(0xFFEF5350),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: (_statusOk ? const Color(0xFF4CAF50) : const Color(0xFFEF5350)).withValues(alpha: 0.5),
|
||||||
|
blurRadius: 8,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _aktionsButton({
|
||||||
|
required IconData icon,
|
||||||
|
required String label,
|
||||||
|
required String beschreibung,
|
||||||
|
required VoidCallback onTap,
|
||||||
|
}) {
|
||||||
|
return Material(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: _ladt ? null : onTap,
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Icon(icon, color: MeloTheme.rot, size: 28),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text(label, style: const TextStyle(color: Colors.white, fontSize: 15, fontWeight: FontWeight.w600)),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text(beschreibung,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(color: MeloTheme.textSekundaer, fontSize: 11)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _intervallAuswahl() {
|
||||||
|
final optionen = [
|
||||||
|
_IntervallOption('Manuell', 0, Icons.block),
|
||||||
|
_IntervallOption('3 Std', 3, Icons.timer),
|
||||||
|
_IntervallOption('6 Std', 6, Icons.timer),
|
||||||
|
_IntervallOption('12 Std', 12, Icons.timer),
|
||||||
|
];
|
||||||
|
|
||||||
|
return Row(
|
||||||
|
children: optionen.map((opt) {
|
||||||
|
final istAktiv = _syncIntervall == opt.wert;
|
||||||
|
return Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
right: opt != optionen.last ? 8 : 0,
|
||||||
|
),
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
setState(() => _syncIntervall = opt.wert);
|
||||||
|
(await SharedPreferences.getInstance()).setInt('cloud_interval', opt.wert);
|
||||||
|
_starteAutoSync();
|
||||||
|
},
|
||||||
|
child: AnimatedContainer(
|
||||||
|
duration: const Duration(milliseconds: 250),
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 6),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: istAktiv ? MeloTheme.rot : MeloTheme.dunkel1,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
side: const BorderSide(color: MeloTheme.dunkel2),
|
border: Border.all(
|
||||||
|
color: istAktiv ? MeloTheme.rot : MeloTheme.dunkel2,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: _ladt ? null : onTap,
|
child: Column(
|
||||||
icon: Icon(icon, size: 18, color: MeloTheme.rot),
|
mainAxisSize: MainAxisSize.min,
|
||||||
label: Text(label, style: const TextStyle(color: Colors.white, fontSize: 14)),
|
children: [
|
||||||
|
Icon(
|
||||||
|
opt.icon,
|
||||||
|
size: 16,
|
||||||
|
color: istAktiv ? Colors.white : MeloTheme.textSekundaer,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
Text(
|
||||||
|
opt.label,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: istAktiv ? Colors.white : MeloTheme.textSekundaer,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _sektionsHeader(String titel) {
|
||||||
|
return Text(
|
||||||
|
titel,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: MeloTheme.textSekundaer,
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: 1.2,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class _IntervallOption {
|
||||||
|
final String label;
|
||||||
|
final int wert;
|
||||||
|
final IconData icon;
|
||||||
|
const _IntervallOption(this.label, this.wert, this.icon);
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,9 +2,15 @@ import 'dart:io';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
import 'package:just_audio/just_audio.dart';
|
||||||
import '../services/download_service.dart';
|
import '../services/download_service.dart';
|
||||||
|
import '../services/cloud_service.dart';
|
||||||
|
import '../models/song.dart';
|
||||||
|
import '../database/db_helper.dart';
|
||||||
import '../utils/farb_theme.dart';
|
import '../utils/farb_theme.dart';
|
||||||
import '../services/melo_logger.dart';
|
import '../services/melo_logger.dart';
|
||||||
|
import '../config/app_config.dart';
|
||||||
|
import '../widgets/melo_loader.dart';
|
||||||
|
|
||||||
class DownloadScreen extends StatefulWidget {
|
class DownloadScreen extends StatefulWidget {
|
||||||
final DownloadService downloader;
|
final DownloadService downloader;
|
||||||
@@ -20,58 +26,114 @@ class DownloadScreen extends StatefulWidget {
|
|||||||
State<DownloadScreen> createState() => _DownloadScreenState();
|
State<DownloadScreen> createState() => _DownloadScreenState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _DownloadScreenState extends State<DownloadScreen> {
|
class _DownloadScreenState extends State<DownloadScreen> with WidgetsBindingObserver {
|
||||||
final _urlController = TextEditingController();
|
final _urlController = TextEditingController();
|
||||||
|
final _cloud = CloudService();
|
||||||
|
final _previewPlayer = AudioPlayer();
|
||||||
bool _ladt = false;
|
bool _ladt = false;
|
||||||
|
List<Map<String, dynamic>> _globalSongs = [];
|
||||||
|
String? _previewSid;
|
||||||
String? _fehler;
|
String? _fehler;
|
||||||
String? _erfolg;
|
String? _erfolg;
|
||||||
String _speicherOrt = 'Intern (Documents/music)';
|
String _speicherOrt = 'App-intern (Music/)';
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
|
_previewPlayer.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||||
|
if (state == AppLifecycleState.paused || state == AppLifecycleState.inactive) {
|
||||||
|
_stopPreview();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _ladeGlobalListe() async {
|
||||||
|
final songs = await _cloud.globalList();
|
||||||
|
if (mounted) setState(() => _globalSongs = songs.cast<Map<String, dynamic>>());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _addFromRegistry(String sid, String title) async {
|
||||||
|
setState(() => _ladt = true);
|
||||||
|
try {
|
||||||
|
final dir = Directory('${(await getApplicationDocumentsDirectory()).path}/music');
|
||||||
|
if (!await dir.exists()) await dir.create(recursive: true);
|
||||||
|
final dest = '${dir.path}/cloud_$sid.mp3';
|
||||||
|
final ok = await _cloud.download(sid, dest);
|
||||||
|
if (ok && mounted) {
|
||||||
|
final song = Song(
|
||||||
|
titel: title.isNotEmpty ? title : 'Cloud-Song $sid',
|
||||||
|
kuenstler: 'Melo Registry',
|
||||||
|
dauerSekunden: 0,
|
||||||
|
dateiPfad: dest,
|
||||||
|
downloadQuelle: 'cloud',
|
||||||
|
istHeruntergeladen: true,
|
||||||
|
);
|
||||||
|
await DbHelper().songEinfuegen(song);
|
||||||
|
setState(() => _erfolg = 'Song "$title" hinzugefügt!');
|
||||||
|
widget.onSongsChanged();
|
||||||
|
await _ladeGlobalListe();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
setState(() => _fehler = 'Fehler beim Hinzufügen');
|
||||||
|
MeloLogger().fehler('add_from_registry', e);
|
||||||
|
}
|
||||||
|
if (mounted) setState(() => _ladt = false);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _startPreview(String sid) async {
|
||||||
|
if (_previewSid == sid && _previewPlayer.playing) {
|
||||||
|
await _stopPreview();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_previewSid = sid;
|
||||||
|
try {
|
||||||
|
final url = '${AppConfig.cloudUrl}/api/cloud/stream/$sid';
|
||||||
|
await _previewPlayer.setUrl(url);
|
||||||
|
await _previewPlayer.seek(const Duration(seconds: 11));
|
||||||
|
await _previewPlayer.play();
|
||||||
|
Future.delayed(const Duration(seconds: 10), () {
|
||||||
|
if (_previewSid == sid) _stopPreview();
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
MeloLogger().fehler('preview', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _stopPreview() async {
|
||||||
|
_previewSid = null;
|
||||||
|
await _previewPlayer.stop();
|
||||||
|
}
|
||||||
|
bool _speichertInDownloads = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
WidgetsBinding.instance.addObserver(this);
|
||||||
_ladeSpeicherPfad();
|
_ladeSpeicherPfad();
|
||||||
}
|
_ladeGlobalListe();
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_urlController.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _ladeSpeicherPfad() async {
|
Future<void> _ladeSpeicherPfad() async {
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
final pfad = prefs.getString('speicher_pfad');
|
final inDownloads = prefs.getBool('download_in_downloads') ?? false;
|
||||||
if (pfad != null && pfad.isNotEmpty) {
|
if (inDownloads) {
|
||||||
|
final dir = await getDownloadsDirectory();
|
||||||
|
if (dir != null) {
|
||||||
|
final pfad = '${dir.path}/Melo';
|
||||||
widget.downloader.setzeSpeicherPfad(pfad);
|
widget.downloader.setzeSpeicherPfad(pfad);
|
||||||
setState(() => _speicherOrt = pfad.split('/').last);
|
setState(() {
|
||||||
} else {
|
_speichertInDownloads = true;
|
||||||
final pf = await _standardPfad();
|
_speicherOrt = '⬇ Downloads/Melo';
|
||||||
widget.downloader.setzeSpeicherPfad(pf);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> _standardPfad() async {
|
|
||||||
if (Platform.isIOS) return '${(await getApplicationDocumentsDirectory()).path}/music';
|
|
||||||
final p = await SharedPreferences.getInstance();
|
|
||||||
if (p.getBool('manage_storage') == true) {
|
|
||||||
final d = await getDownloadsDirectory();
|
|
||||||
if (d != null) return '${d.path}/Melo';
|
|
||||||
}
|
|
||||||
final ext = await getExternalStorageDirectory();
|
|
||||||
return ext != null ? '${ext.path}/Melo' : '${(await getApplicationDocumentsDirectory()).path}/music';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _ordnerDialog() async {
|
Future<void> _ordnerDialog() async {
|
||||||
if (Platform.isIOS) {
|
|
||||||
final appDir = await getApplicationDocumentsDirectory();
|
|
||||||
final pfad = '${appDir.path}/music';
|
|
||||||
widget.downloader.setzeSpeicherPfad(pfad);
|
|
||||||
setState(() => _speicherOrt = '📁 App-intern');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Android: Ordner wählen via Text-Eingabe oder vordefinierte Optionen
|
|
||||||
final auswahl = await showDialog<String>(
|
final auswahl = await showDialog<String>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (ctx) => AlertDialog(
|
builder: (ctx) => AlertDialog(
|
||||||
@@ -80,88 +142,96 @@ class _DownloadScreenState extends State<DownloadScreen> {
|
|||||||
content: Column(
|
content: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_optionTile(ctx, '📁 Intern (App-Ordner)', 'intern', icon: Icons.phone_android),
|
_optionTile(ctx, '📁 App-intern (Music/)', 'intern',
|
||||||
|
icon: Icons.phone_android),
|
||||||
|
if (!Platform.isIOS) ...[
|
||||||
const Divider(color: MeloTheme.dunkel2),
|
const Divider(color: MeloTheme.dunkel2),
|
||||||
_optionTile(ctx, '⬇ Downloads/Melo', 'downloads', icon: Icons.download),
|
_optionTile(ctx, '⬇ Downloads/Melo', 'downloads',
|
||||||
|
icon: Icons.download),
|
||||||
const Divider(color: MeloTheme.dunkel2),
|
const Divider(color: MeloTheme.dunkel2),
|
||||||
_optionTile(ctx, '📂 Eigener Pfad...', 'custom', icon: Icons.folder_open),
|
_optionTile(ctx, '💾 SD-Karte / Extern', 'extern',
|
||||||
|
icon: Icons.sd_storage),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (auswahl == null || !mounted) return;
|
|
||||||
|
|
||||||
String pfad;
|
if (auswahl == null) return;
|
||||||
if (auswahl == 'custom') {
|
|
||||||
final ctrl = TextEditingController();
|
|
||||||
final p = await showDialog<String>(
|
|
||||||
context: context,
|
|
||||||
builder: (ctx) => AlertDialog(
|
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
|
||||||
title: const Text('Pfad eingeben', style: TextStyle(color: Colors.white, fontSize: 15)),
|
|
||||||
content: TextField(
|
|
||||||
controller: ctrl, autofocus: true,
|
|
||||||
style: const TextStyle(color: Colors.white),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText: '/storage/emulated/0/Music/Melo',
|
|
||||||
hintStyle: const TextStyle(color: Colors.grey),
|
|
||||||
border: const OutlineInputBorder(),
|
|
||||||
prefixIcon: const Icon(Icons.folder, color: Colors.grey),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(onPressed: () => Navigator.pop(ctx), child: const Text('Abbrechen')),
|
|
||||||
TextButton(onPressed: () => Navigator.pop(ctx, ctrl.text.trim()), child: const Text('OK', style: TextStyle(color: MeloTheme.rot))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
if (p == null || p.isEmpty) return;
|
|
||||||
pfad = p;
|
|
||||||
} else if (auswahl == 'intern') {
|
|
||||||
pfad = await _standardPfad();
|
|
||||||
} else {
|
|
||||||
final d = await getDownloadsDirectory();
|
|
||||||
pfad = d != null ? '${d.path}/Melo' : await _standardPfad();
|
|
||||||
}
|
|
||||||
|
|
||||||
await Directory(pfad).create(recursive: true);
|
|
||||||
widget.downloader.setzeSpeicherPfad(pfad);
|
|
||||||
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
await prefs.setString('speicher_pfad', pfad);
|
if (auswahl == 'downloads') {
|
||||||
|
final dir = await getDownloadsDirectory();
|
||||||
setState(() => _speicherOrt = pfad.split('/').last);
|
if (dir != null) {
|
||||||
|
final pfad = '${dir.path}/Melo';
|
||||||
|
await prefs.setBool('download_in_downloads', true);
|
||||||
|
widget.downloader.setzeSpeicherPfad(pfad);
|
||||||
|
setState(() {
|
||||||
|
_speichertInDownloads = true;
|
||||||
|
_speicherOrt = '⬇ Downloads/Melo';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (auswahl == 'extern') {
|
||||||
|
final dirs = await getExternalStorageDirectories();
|
||||||
|
if (dirs != null && dirs.isNotEmpty) {
|
||||||
|
final pfad = '${dirs.first.path}/Melo';
|
||||||
|
await prefs.setBool('download_in_downloads', false);
|
||||||
|
widget.downloader.setzeSpeicherPfad(pfad);
|
||||||
|
setState(() {
|
||||||
|
_speichertInDownloads = false;
|
||||||
|
_speicherOrt = '💾 ${dirs.first.path.split('/').last}/Melo';
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (mounted) setState(() => _fehler = 'Kein externer Speicher gefunden');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
await prefs.setBool('download_in_downloads', false);
|
||||||
|
widget.downloader.setzeSpeicherPfad('');
|
||||||
|
setState(() {
|
||||||
|
_speichertInDownloads = false;
|
||||||
|
_speicherOrt = '📁 App-intern (Music/)';
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _optionTile(BuildContext ctx, String label, String wert, {IconData? icon}) {
|
Widget _optionTile(BuildContext ctx, String label, String wert,
|
||||||
|
{required IconData icon}) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
leading: Icon(icon ?? Icons.folder, color: MeloTheme.rot, size: 20),
|
leading: Icon(icon, color: MeloTheme.rot, size: 20),
|
||||||
title: Text(label, style: const TextStyle(color: Colors.white, fontSize: 13)),
|
title: Text(label,
|
||||||
|
style: const TextStyle(color: Colors.white, fontSize: 13)),
|
||||||
onTap: () => Navigator.pop(ctx, wert),
|
onTap: () => Navigator.pop(ctx, wert),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _startDownload() async {
|
void _starteDownload() async {
|
||||||
final url = _urlController.text.trim();
|
final input = _urlController.text.trim();
|
||||||
if (url.isEmpty) return;
|
if (input.isEmpty) {
|
||||||
|
setState(() => _fehler = 'Bitte eine YouTube-URL einfügen');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setState(() { _ladt = true; _fehler = null; _erfolg = null; });
|
setState(() { _ladt = true; _fehler = null; _erfolg = null; });
|
||||||
|
MeloLogger().aktion('download_start', {'url': input.substring(0, 40)});
|
||||||
|
|
||||||
try {
|
final anzahl = await widget.downloader.downloadBatch(input);
|
||||||
final song = await widget.downloader.downloadVonUrl(url);
|
if (mounted) {
|
||||||
if (!mounted) return;
|
setState(() {
|
||||||
if (song != null) {
|
_ladt = false;
|
||||||
setState(() { _ladt = false; _erfolg = '✅ "${song.titel}" heruntergeladen!'; });
|
if (anzahl > 0) {
|
||||||
widget.onSongsChanged();
|
_erfolg = '✅ $anzahl Song${anzahl > 1 ? 's' : ''} gespeichert';
|
||||||
} else {
|
} else {
|
||||||
setState(() { _ladt = false; _fehler = widget.downloader.fehler ?? '❌ Download fehlgeschlagen'; });
|
_fehler = widget.downloader.fehler ?? 'Download fehlgeschlagen';
|
||||||
}
|
}
|
||||||
} catch (e) {
|
});
|
||||||
MeloLogger().fehler('download', e);
|
widget.onSongsChanged();
|
||||||
if (mounted) setState(() { _ladt = false; _fehler = 'Fehler: $e'; });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _abbrechen() {
|
||||||
|
widget.downloader.abbrechen();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@@ -169,54 +239,271 @@ class _DownloadScreenState extends State<DownloadScreen> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
backgroundColor: MeloTheme.dunkel1,
|
||||||
title: const Row(children: [
|
title: const Row(children: [
|
||||||
Icon(Icons.add_circle, color: MeloTheme.rot, size: 20),
|
Icon(Icons.download, color: MeloTheme.rot, size: 20),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
Text('Lied +', style: TextStyle(color: Colors.white, fontSize: 18)),
|
Text('Lied +', style: TextStyle(color: Colors.white, fontSize: 18)),
|
||||||
]),
|
]),
|
||||||
|
actions: [
|
||||||
|
if (_erfolg != null || _fehler != null)
|
||||||
|
IconButton(
|
||||||
|
icon: const Icon(Icons.refresh, color: Colors.grey, size: 20),
|
||||||
|
onPressed: () => setState(() { _fehler = null; _erfolg = null; _urlController.clear(); }),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
child: Column(children: [
|
child: Column(
|
||||||
|
children: [
|
||||||
|
// ─── Globale Registry (Lied +) ───
|
||||||
|
if (_globalSongs.isNotEmpty) ...[
|
||||||
|
Row(children: [
|
||||||
|
const Icon(Icons.public, color: MeloTheme.rot, size: 16),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
Text('Globale Songs (${_globalSongs.length})',
|
||||||
|
style: const TextStyle(color: Colors.white70, fontSize: 13, fontWeight: FontWeight.w600)),
|
||||||
|
const Spacer(),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: _ladeGlobalListe,
|
||||||
|
child: const Icon(Icons.refresh, color: Colors.grey, size: 16),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
SizedBox(
|
||||||
|
height: 100,
|
||||||
|
child: ListView.builder(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
itemCount: _globalSongs.length,
|
||||||
|
itemBuilder: (_, i) {
|
||||||
|
final s = _globalSongs[i];
|
||||||
|
final sid = s['id']?.toString() ?? '';
|
||||||
|
final title = s['title']?.toString() ?? '?';
|
||||||
|
final isPreviewing = _previewSid == sid;
|
||||||
|
return Container(
|
||||||
|
width: 140,
|
||||||
|
margin: const EdgeInsets.only(right: 8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: isPreviewing ? const Color(0xFF2A0000) : MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
border: Border.all(color: isPreviewing ? MeloTheme.rot : MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(title, style: TextStyle(fontSize: 11, color: Colors.white, fontWeight: FontWeight.w500),
|
||||||
|
maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => _startPreview(sid),
|
||||||
|
child: Icon(isPreviewing ? Icons.stop : Icons.play_arrow,
|
||||||
|
color: isPreviewing ? Colors.white : MeloTheme.rot, size: 20),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => _addFromRegistry(sid, title),
|
||||||
|
child: const Icon(Icons.add_circle_outline, color: Colors.grey, size: 18),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(color: MeloTheme.dunkel2),
|
||||||
|
],
|
||||||
|
// ─── Zielordner ───
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: _ladt ? null : _ordnerDialog,
|
onTap: _ladt ? null : _ordnerDialog,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity, padding: const EdgeInsets.all(12),
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(color: MeloTheme.dunkel1, borderRadius: BorderRadius.circular(12), border: Border.all(color: MeloTheme.dunkel2)),
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
const Icon(Icons.folder, color: MeloTheme.rot, size: 18), const SizedBox(width: 8),
|
const Icon(Icons.folder, color: MeloTheme.rot, size: 18),
|
||||||
Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
const Text('Speicherort', style: TextStyle(color: Colors.grey, fontSize: 11)),
|
const Text('Speicherort', style: TextStyle(color: Colors.grey, fontSize: 11)),
|
||||||
Text(_speicherOrt, style: const TextStyle(color: Colors.white, fontSize: 13)),
|
Text(_speicherOrt, style: const TextStyle(color: Colors.white, fontSize: 13)),
|
||||||
])),
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
const Icon(Icons.chevron_right, color: Colors.grey, size: 18),
|
const Icon(Icons.chevron_right, color: Colors.grey, size: 18),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
|
// ─── Eingabefeld ───
|
||||||
TextField(
|
TextField(
|
||||||
controller: _urlController, style: const TextStyle(color: Colors.white),
|
controller: _urlController,
|
||||||
|
enabled: !_ladt,
|
||||||
|
maxLines: 3,
|
||||||
|
style: const TextStyle(color: Colors.white, fontSize: 14),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: 'YouTube / SoundCloud URL...', hintStyle: const TextStyle(color: Colors.grey),
|
hintText: 'YouTube-URL hier einfügen...\n\nMehrere URLs: eine pro Zeile\nPlaylists werden erkannt 🎯',
|
||||||
filled: true, fillColor: MeloTheme.dunkel1,
|
hintStyle: const TextStyle(color: Colors.grey, fontSize: 13),
|
||||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: MeloTheme.dunkel2)),
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
prefixIcon: const Icon(Icons.link, color: Colors.grey),
|
filled: true,
|
||||||
|
fillColor: MeloTheme.dunkel1,
|
||||||
|
contentPadding: const EdgeInsets.all(16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
|
// ─── Animierte Ladeanzeige (während Download) ───
|
||||||
|
if (_ladt) ...[
|
||||||
|
MeloLoader(
|
||||||
|
titel: widget.downloader.aktuellerTitel ?? 'Lade herunter...',
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
|
||||||
|
// ─── Download-Button ───
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
height: 48,
|
||||||
child: ElevatedButton.icon(
|
child: ElevatedButton.icon(
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: MeloTheme.rot, padding: const EdgeInsets.symmetric(vertical: 14), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))),
|
onPressed: _ladt ? null : _starteDownload,
|
||||||
onPressed: _ladt ? null : _startDownload,
|
icon: _ladt
|
||||||
icon: _ladt ? const SizedBox(width: 20, height: 20, child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white)) : const Icon(Icons.download, color: Colors.white),
|
? const SizedBox(width: 20, height: 20,
|
||||||
label: Text(_ladt ? 'Lädt...' : 'Download', style: const TextStyle(color: Colors.white, fontSize: 15)),
|
child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white))
|
||||||
|
: const Icon(Icons.download, size: 20),
|
||||||
|
label: Text(_ladt ? 'Lädt...' : '⬇ Download'),
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: MeloTheme.rot,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
),
|
||||||
if (_fehler != null) Padding(padding: const EdgeInsets.only(top: 8), child: Text(_fehler!, style: const TextStyle(color: Colors.red, fontSize: 13))),
|
if (_ladt) ...[
|
||||||
if (_erfolg != null) Padding(padding: const EdgeInsets.only(top: 8), child: Text(_erfolg!, style: const TextStyle(color: Colors.green, fontSize: 13))),
|
const SizedBox(height: 8),
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 40,
|
||||||
|
child: ElevatedButton.icon(
|
||||||
|
onPressed: _abbrechen,
|
||||||
|
icon: const Icon(Icons.cancel, size: 18),
|
||||||
|
label: const Text('Abbrechen'),
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Colors.red.shade800,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
|
||||||
|
// ─── Fortschritt ───
|
||||||
|
if (_ladt)
|
||||||
|
ListenableBuilder(
|
||||||
|
listenable: widget.downloader,
|
||||||
|
builder: (context, _) {
|
||||||
|
final fortschritt = widget.downloader.fortschritt;
|
||||||
|
|
||||||
|
if (fortschritt <= 0) return const SizedBox.shrink();
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
child: Column(children: [
|
||||||
|
LinearProgressIndicator(
|
||||||
|
value: fortschritt,
|
||||||
|
color: MeloTheme.rot,
|
||||||
|
backgroundColor: MeloTheme.dunkel2),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text('${(fortschritt * 100).toStringAsFixed(0)}%',
|
||||||
|
style: const TextStyle(color: Colors.grey, fontSize: 11)),
|
||||||
]),
|
]),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
|
// ─── Erfolg ───
|
||||||
|
if (_erfolg != null)
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: Colors.green.withValues(alpha: 0.3)),
|
||||||
|
),
|
||||||
|
child: Row(children: [
|
||||||
|
const Icon(Icons.check_circle, color: Colors.green, size: 24),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Expanded(child: Text(_erfolg!, style: const TextStyle(color: Colors.green, fontSize: 13))),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
|
||||||
|
// ─── Fehler ───
|
||||||
|
if (_fehler != null)
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: Colors.red.withValues(alpha: 0.3)),
|
||||||
|
),
|
||||||
|
child: Row(children: [
|
||||||
|
const Icon(Icons.error_outline, color: Colors.red, size: 24),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Expanded(child: Text(_fehler!, style: const TextStyle(color: Colors.red, fontSize: 13))),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
|
||||||
|
const Spacer(),
|
||||||
|
|
||||||
|
// ─── Tipps ───
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Text('💡 Tipps', style: TextStyle(color: Colors.grey, fontSize: 12, fontWeight: FontWeight.w600)),
|
||||||
|
const SizedBox(height: 6),
|
||||||
|
_tipp('Einzel-URL: youtube.com/watch?v=...'),
|
||||||
|
_tipp('Playlist: youtube.com/playlist?list=...'),
|
||||||
|
_tipp('Mehrere: eine URL pro Zeile'),
|
||||||
|
_tipp('Cooldown: 5s zwischen Downloads ⏱'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _tipp(String text) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 4),
|
||||||
|
child: Row(children: [
|
||||||
|
const Text('• ', style: TextStyle(color: MeloTheme.rot, fontSize: 12)),
|
||||||
|
Expanded(child: Text(text, style: const TextStyle(color: Colors.grey, fontSize: 11))),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,21 @@
|
|||||||
import 'dart:async';
|
|
||||||
import 'dart:io';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../database/db_helper.dart';
|
import 'dart:async';
|
||||||
import '../viewmodels/melo_home_viewmodel.dart';
|
import '../viewmodels/melo_home_viewmodel.dart';
|
||||||
import '../models/song.dart';
|
import '../models/song.dart';
|
||||||
import '../models/playlist.dart';
|
import '../models/playlist.dart';
|
||||||
import '../utils/farb_theme.dart';
|
import '../utils/farb_theme.dart';
|
||||||
import '../utils/user_effekte.dart';
|
|
||||||
import '../services/cloud_service.dart';
|
|
||||||
import '../services/favoriten_service.dart';
|
|
||||||
import '../widgets/mini_player.dart';
|
import '../widgets/mini_player.dart';
|
||||||
import '../widgets/melo_header.dart';
|
import '../widgets/melo_header.dart';
|
||||||
import '../widgets/statistik_card.dart';
|
import '../widgets/statistik_card.dart';
|
||||||
import '../widgets/recent_widget.dart';
|
|
||||||
import '../widgets/tag_stats_widget.dart';
|
|
||||||
import '../widgets/tag_leiste.dart';
|
import '../widgets/tag_leiste.dart';
|
||||||
import '../widgets/song_tile.dart';
|
import '../widgets/song_tile.dart';
|
||||||
import '../widgets/navidrome_browser.dart';
|
import '../widgets/navidrome_browser.dart';
|
||||||
import '../widgets/playlist_sheet.dart';
|
import '../widgets/playlist_sheet.dart';
|
||||||
import 'download_screen.dart';
|
import 'download_screen.dart';
|
||||||
import 'cloud_screen.dart';
|
import 'cloud_screen.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'settings_screen.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import '../services/cloud_service.dart';
|
||||||
import '../widgets/cloud_einstellungen.dart';
|
import '../services/auth_service.dart';
|
||||||
import '../config/app_config.dart';
|
import '../config/app_config.dart';
|
||||||
|
|
||||||
class MeloHome extends StatefulWidget {
|
class MeloHome extends StatefulWidget {
|
||||||
@@ -37,221 +30,12 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
final CloudService _cloud = CloudService();
|
final CloudService _cloud = CloudService();
|
||||||
int _aktiverTab = 0;
|
int _aktiverTab = 0;
|
||||||
|
|
||||||
String _nutzer = 'Baka'; // Aktueller Nutzer
|
|
||||||
final Future<int> _favoritenZahl = FavoritenService().anzahlFavoriten();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_ladeNutzer();
|
|
||||||
_vm.addListener(() => setState(() {}));
|
|
||||||
_vm.ladeSongs();
|
_vm.ladeSongs();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _ladeNutzer() async {
|
|
||||||
final p = await SharedPreferences.getInstance();
|
|
||||||
final n = p.getString('melo_nutzer') ?? '';
|
|
||||||
if (n.isNotEmpty && mounted) {
|
|
||||||
setState(() => _nutzer = n);
|
|
||||||
_vm.setzeNutzer(n);
|
|
||||||
}
|
|
||||||
// Erster Start? → einmalig Modus wählen (Cloud oder nur lokal) – Login ist freiwillig
|
|
||||||
if (!p.containsKey('melo_modus')) {
|
|
||||||
await _zeigeModusWahl();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Login-Effekt beim App-Start: nur wenn ein Token vorhanden ist (eingeloggt)
|
|
||||||
final ok = await CloudService().restoreLogin();
|
|
||||||
if (ok && mounted) {
|
|
||||||
UserEffekt.anwenden(_nutzer);
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
|
||||||
content: Text(UserEffekt.fuer(_nutzer).begruessung),
|
|
||||||
duration: const Duration(seconds: 3),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Einmalige Auswahl beim ersten App-Start: Cloud-Sync oder nur lokal.
|
|
||||||
Future<void> _zeigeModusWahl() async {
|
|
||||||
if (!mounted) return;
|
|
||||||
final cloud = await showDialog<bool>(
|
|
||||||
context: context,
|
|
||||||
barrierDismissible: false,
|
|
||||||
builder: (ctx) => AlertDialog(
|
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
|
||||||
title: const Text('👋 Willkommen bei Melo!',
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16)),
|
|
||||||
content: const Text(
|
|
||||||
'Wie möchtest du Melo nutzen?',
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 14),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () => Navigator.pop(ctx, false),
|
|
||||||
child: const Text('📱 Nur lokal',
|
|
||||||
style: TextStyle(color: Colors.white)),
|
|
||||||
),
|
|
||||||
TextButton(
|
|
||||||
onPressed: () => Navigator.pop(ctx, true),
|
|
||||||
child: const Text('☁️ Cloud (empfohlen)',
|
|
||||||
style: TextStyle(color: MeloTheme.rot, fontWeight: FontWeight.bold)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
final p = await SharedPreferences.getInstance();
|
|
||||||
await p.setString('melo_modus', cloud == true ? 'cloud' : 'lokal');
|
|
||||||
// Cloud gewählt → direkt zum Login-Dialog (Name + Passwort)
|
|
||||||
if (cloud == true && mounted) {
|
|
||||||
_nutzerWechseln();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _zeigeProfil() async {
|
|
||||||
final p = await SharedPreferences.getInstance();
|
|
||||||
final modus = p.getString('melo_modus') ?? 'cloud';
|
|
||||||
// Cloud-Count VOR dem Dialog auflösen (sonst stünde "Instance of Future" da)
|
|
||||||
final cloudCount = await _cloud.status();
|
|
||||||
if (!mounted) return;
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (ctx) => AlertDialog(
|
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
|
||||||
title: Row(children: [
|
|
||||||
const Icon(Icons.person, color: MeloTheme.rot, size: 22),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Text(_nutzer, style: const TextStyle(color: Colors.white, fontSize: 17)),
|
|
||||||
]),
|
|
||||||
content: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
_profilZeile(Icons.music_note, 'Lieder auf Gerät', '${_vm.songs.length}'),
|
|
||||||
_profilZeile(Icons.cloud, 'Cloud-Server', '${cloudCount?['total'] ?? 0}'),
|
|
||||||
const Divider(color: MeloTheme.dunkel2),
|
|
||||||
// Später von "nur lokal" auf Cloud wechseln – jederzeit möglich
|
|
||||||
if (modus == 'lokal') ...[
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.cloud_upload, color: Colors.blueAccent, size: 18),
|
|
||||||
title: const Text('☁️ Cloud aktivieren',
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 13)),
|
|
||||||
subtitle: const Text('Musik sichern & geräteübergreifend nutzen',
|
|
||||||
style: TextStyle(color: Colors.grey, fontSize: 11)),
|
|
||||||
onTap: () async {
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
|
||||||
await prefs.setString('melo_modus', 'cloud');
|
|
||||||
if (ctx.mounted) Navigator.pop(ctx);
|
|
||||||
_nutzerWechseln();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const Divider(color: MeloTheme.dunkel2),
|
|
||||||
],
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.swap_horiz, color: Colors.grey, size: 18),
|
|
||||||
title: const Text('Nutzer wechseln', style: TextStyle(color: Colors.white, fontSize: 13)),
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
_nutzerWechseln();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.logout, color: Colors.red, size: 18),
|
|
||||||
title: const Text('Abmelden', style: TextStyle(color: Colors.red, fontSize: 13)),
|
|
||||||
onTap: () async {
|
|
||||||
// Token wirklich löschen, sonst wäre man gar nicht abgemeldet
|
|
||||||
await CloudService().logout();
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
|
||||||
await prefs.remove('melo_nutzer');
|
|
||||||
if (ctx.mounted) Navigator.pop(ctx);
|
|
||||||
if (mounted) setState(() => _nutzer = '');
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _profilZeile(IconData icon, String label, String wert) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 6),
|
|
||||||
child: Row(children: [
|
|
||||||
Icon(icon, color: MeloTheme.rot, size: 16),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Expanded(child: Text(label, style: const TextStyle(color: Colors.grey, fontSize: 12))),
|
|
||||||
Text(wert, style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w600)),
|
|
||||||
]),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _nutzerWechseln() {
|
|
||||||
final ctrl = TextEditingController(text: _nutzer);
|
|
||||||
final pwCtrl = TextEditingController();
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (ctx) => AlertDialog(
|
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
|
||||||
title: const Text('👤 Anmelden', style: TextStyle(color: Colors.white, fontSize: 15)),
|
|
||||||
content: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
TextField(
|
|
||||||
controller: ctrl,
|
|
||||||
autofocus: true,
|
|
||||||
style: const TextStyle(color: Colors.white),
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
hintText: 'Nutzername...',
|
|
||||||
hintStyle: TextStyle(color: Colors.grey),
|
|
||||||
border: OutlineInputBorder(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
TextField(
|
|
||||||
controller: pwCtrl,
|
|
||||||
obscureText: true,
|
|
||||||
style: const TextStyle(color: Colors.white),
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
hintText: 'Passwort...',
|
|
||||||
hintStyle: TextStyle(color: Colors.grey),
|
|
||||||
border: OutlineInputBorder(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(onPressed: () => Navigator.pop(ctx), child: const Text('Abbrechen')),
|
|
||||||
TextButton(
|
|
||||||
onPressed: () async {
|
|
||||||
final name = ctrl.text.trim();
|
|
||||||
final pass = pwCtrl.text;
|
|
||||||
if (name.isEmpty || pass.isEmpty) return;
|
|
||||||
final ok = await _vm.cloud.login(name, pass);
|
|
||||||
if (!ctx.mounted) return;
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
if (ok) {
|
|
||||||
final p = await SharedPreferences.getInstance();
|
|
||||||
await p.setString('melo_nutzer', name);
|
|
||||||
if (mounted) setState(() => _nutzer = name);
|
|
||||||
_vm.setzeNutzer(name);
|
|
||||||
// Login-Effekt: Akzentfarbe + Sound + Begrüßung pro Person
|
|
||||||
UserEffekt.anwenden(name);
|
|
||||||
if (mounted) {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
|
||||||
content: Text(UserEffekt.fuer(name).begruessung),
|
|
||||||
duration: const Duration(seconds: 3)));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (mounted) {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
|
||||||
content: Text('❌ Login fehlgeschlagen – Name oder Passwort falsch')));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: const Text('OK', style: TextStyle(color: MeloTheme.rot)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_vm.dispose();
|
_vm.dispose();
|
||||||
@@ -448,29 +232,6 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _songLoeschen(Song song) async {
|
|
||||||
if (song.id != null) {
|
|
||||||
final db = DbHelper();
|
|
||||||
await db.loeschSong(song.id!);
|
|
||||||
if (song.dateiPfad.isNotEmpty) {
|
|
||||||
try { await File(song.dateiPfad).delete(); } catch (_) {}
|
|
||||||
}
|
|
||||||
_vm.ladeSongs();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _zeigePlaylists() {
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
backgroundColor: MeloTheme.schwarz,
|
|
||||||
isScrollControlled: true,
|
|
||||||
builder: (_) => SizedBox(
|
|
||||||
height: MediaQuery.of(context).size.height * 0.7,
|
|
||||||
child: PlaylistSheet(vm: _vm),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _zeigeAddToPlaylist(Song song) async {
|
void _zeigeAddToPlaylist(Song song) async {
|
||||||
final playlists = await _vm.playlists.allePlaylists();
|
final playlists = await _vm.playlists.allePlaylists();
|
||||||
if (!mounted || playlists.isEmpty) {
|
if (!mounted || playlists.isEmpty) {
|
||||||
@@ -529,8 +290,8 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final gesamtMB = _vm.songs.isEmpty ? '0.0'
|
final gesamtMB = _vm.songs.isEmpty ? '0'
|
||||||
: (_vm.songs.fold(0, (int s, Song song) => s + song.groesseBytes) / 1048576).toStringAsFixed(1);
|
: (_vm.songs.fold(0, (int s, Song song) => s + song.groesseBytes) / 1048576).toStringAsFixed(0);
|
||||||
final gesamtMin = _vm.songs.isEmpty ? 0
|
final gesamtMin = _vm.songs.isEmpty ? 0
|
||||||
: (_vm.songs.fold(0, (int s, Song song) => s + song.dauerSekunden) / 60).round();
|
: (_vm.songs.fold(0, (int s, Song song) => s + song.dauerSekunden) / 60).round();
|
||||||
|
|
||||||
@@ -542,23 +303,31 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
downloader: _vm.downloader,
|
downloader: _vm.downloader,
|
||||||
onSongsChanged: _vm.ladeSongs,
|
onSongsChanged: _vm.ladeSongs,
|
||||||
)
|
)
|
||||||
: _aktiverTab == 3
|
: _aktiverTab == 4
|
||||||
? CloudScreen(cloud: _cloud, onSongsChanged: _vm.ladeSongs)
|
? CloudScreen(cloud: _cloud)
|
||||||
: Column(
|
: Column(
|
||||||
children: [
|
children: [
|
||||||
MeloHeader(onDownload: _zeigeDownloadDialog, onSearch: _zeigeSuche, onServer: _zeigeProfil, onSettings: _zeigeEinstellungen),
|
MeloHeader(onDownload: _zeigeDownloadDialog, onSearch: _zeigeSuche, onServer: _zeigeServerBrowser),
|
||||||
if (_vm.zeigeBotschaft) _botschaftBanner(),
|
// ─── EIN/AUS: RecentWidget (Zuletzt gehört) ───
|
||||||
_tagBereich(),
|
// Entferne die Kommentarzeichen um RecentWidget zu aktivieren:
|
||||||
FutureBuilder<int>(
|
// RecentWidget(songs: _vm.letzteSongs, onPlay: _vm.spieleSong),
|
||||||
future: _favoritenZahl,
|
StatistikCard(
|
||||||
builder: (context, snap) => StatistikCard(
|
|
||||||
anzahlSongs: _vm.songs.length,
|
anzahlSongs: _vm.songs.length,
|
||||||
gesamtMB: gesamtMB,
|
gesamtMB: gesamtMB,
|
||||||
gesamtMin: gesamtMin,
|
gesamtMin: gesamtMin,
|
||||||
anzahlFavoriten: snap.data ?? 0,
|
anzahlFavoriten: _vm.favoritenIds.length,
|
||||||
),
|
),
|
||||||
|
// ─── EIN/AUS: Hidden Message "Seit 2008" ───
|
||||||
|
// Entferne die Kommentarzeichen um die Botschaft zu aktivieren:
|
||||||
|
if (_vm.zeigeBotschaft) _botschaftBanner(),
|
||||||
|
TagLeiste(
|
||||||
|
tags: _vm.tags,
|
||||||
|
aktiveTags: _vm.aktiveTags,
|
||||||
|
onTagToggled: _vm.toggleTag,
|
||||||
),
|
),
|
||||||
RecentWidget(songs: _vm.letzteSongs, onPlay: _vm.spieleSong),
|
// ─── EIN/AUS: TagStatsWidget (Tag-Counts) ───
|
||||||
|
// Entferne die Kommentarzeichen um TagStatsWidget zu aktivieren:
|
||||||
|
// TagStatsWidget(tagCounts: _vm.tagCounts),
|
||||||
Expanded(child: _songListe()),
|
Expanded(child: _songListe()),
|
||||||
const MiniPlayer(),
|
const MiniPlayer(),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
@@ -607,9 +376,7 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: songs.isEmpty
|
child: ListView.builder(
|
||||||
? _emptyStateWidget()
|
|
||||||
: ListView.builder(
|
|
||||||
padding: const EdgeInsets.fromLTRB(20, 4, 20, 4),
|
padding: const EdgeInsets.fromLTRB(20, 4, 20, 4),
|
||||||
itemCount: songs.length,
|
itemCount: songs.length,
|
||||||
itemBuilder: (_, i) => SongTile(
|
itemBuilder: (_, i) => SongTile(
|
||||||
@@ -619,7 +386,6 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
onPlay: _vm.spieleSong,
|
onPlay: _vm.spieleSong,
|
||||||
onMetadataChanged: _vm.ladeSongs,
|
onMetadataChanged: _vm.ladeSongs,
|
||||||
onAddToPlaylist: _zeigeAddToPlaylist,
|
onAddToPlaylist: _zeigeAddToPlaylist,
|
||||||
onDelete: _songLoeschen,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -627,85 +393,26 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _zeigeEinstellungen() {
|
Future<void> _oeffneEinstellungen() async {
|
||||||
showDialog(
|
final result = await Navigator.push<String>(
|
||||||
context: context,
|
context,
|
||||||
builder: (ctx) => AlertDialog(
|
MaterialPageRoute(builder: (_) => const SettingsScreen()),
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
);
|
||||||
title: const Text('⚙ Einstellungen', style: TextStyle(color: Colors.white, fontSize: 16)),
|
if (!mounted || result == null) return;
|
||||||
content: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
switch (result) {
|
||||||
children: [
|
case 'server':
|
||||||
// Stats
|
_zeigeServerBrowser();
|
||||||
Container(
|
break;
|
||||||
padding: const EdgeInsets.all(12),
|
case 'logout':
|
||||||
margin: const EdgeInsets.only(bottom: 12),
|
await AuthService().logout();
|
||||||
decoration: BoxDecoration(color: MeloTheme.dunkel2, borderRadius: BorderRadius.circular(10)),
|
if (mounted) {
|
||||||
child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
Navigator.of(context).pushReplacement(
|
||||||
_statWert('${_vm.songs.length}', 'Songs'),
|
MaterialPageRoute(builder: (_) => const MeloHome()),
|
||||||
_statWert('${(_vm.songs.fold(0, (int s, Song song) => s + song.groesseBytes) / 1048576).toStringAsFixed(1)} MB', 'Größe'),
|
|
||||||
_statWert('${(_vm.songs.fold(0, (int s, Song song) => s + song.dauerSekunden) / 60).round()} Min', 'Dauer'),
|
|
||||||
_statWert('${_vm.favoritenIds.length}', '❤️'),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.favorite, color: MeloTheme.rot),
|
|
||||||
title: const Text('Favoriten', style: TextStyle(color: Colors.white)),
|
|
||||||
subtitle: const Text('Deine Lieblingssongs', style: TextStyle(color: Colors.grey, fontSize: 12)),
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
_vm.aktiveTags = {'★ Favoriten'};
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.cloud, color: MeloTheme.rot),
|
|
||||||
title: const Text('Cloud Sync', style: TextStyle(color: Colors.white)),
|
|
||||||
subtitle: const Text('Auto-Sync & Einstellungen', style: TextStyle(color: Colors.grey, fontSize: 12)),
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (_) => const CloudEinstellungen(),
|
|
||||||
);
|
);
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.dns, color: MeloTheme.rot),
|
|
||||||
title: const Text('Server verbinden', style: TextStyle(color: Colors.white)),
|
|
||||||
subtitle: const Text('Navidrome / Musik-Server', style: TextStyle(color: Colors.grey, fontSize: 12)),
|
|
||||||
onTap: () { Navigator.pop(ctx); _zeigeServerBrowser(); },
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.person, color: MeloTheme.rot),
|
|
||||||
title: const Text('Profil', style: TextStyle(color: Colors.white)),
|
|
||||||
subtitle: Text(_nutzer.isEmpty ? 'Nicht angemeldet' : _nutzer, style: const TextStyle(color: Colors.grey, fontSize: 12)),
|
|
||||||
onTap: () { Navigator.pop(ctx); _zeigeProfil(); },
|
|
||||||
),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text('Diagnosedaten senden', style: TextStyle(color: Colors.white, fontSize: 13)),
|
|
||||||
subtitle: const Text('Absturz-Logs & Nutzungsdaten', style: TextStyle(color: Colors.grey, fontSize: 11)),
|
|
||||||
value: AppConfig.sendeDiagnosedaten,
|
|
||||||
activeColor: MeloTheme.rot,
|
|
||||||
onChanged: (v) {
|
|
||||||
AppConfig.sendeDiagnosedaten = v;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
if (Platform.isAndroid)
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.folder_open, color: MeloTheme.rot),
|
|
||||||
title: const Text('Voller Speicherzugriff', style: TextStyle(color: Colors.white)),
|
|
||||||
subtitle: const Text('Zum Speichern in Downloads/Music', style: TextStyle(color: Colors.grey, fontSize: 12)),
|
|
||||||
onTap: () async {
|
|
||||||
final status = await Permission.manageExternalStorage.request();
|
|
||||||
if (status.isGranted) {
|
|
||||||
await SharedPreferences.getInstance().then((p) => p.setBool('manage_storage', true));
|
|
||||||
}
|
}
|
||||||
},
|
break;
|
||||||
),
|
}
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _bottomNav() {
|
Widget _bottomNav() {
|
||||||
@@ -718,21 +425,28 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
backgroundColor: MeloTheme.schwarz,
|
backgroundColor: MeloTheme.schwarz,
|
||||||
selectedItemColor: MeloTheme.rot,
|
selectedItemColor: MeloTheme.rot,
|
||||||
unselectedItemColor: MeloTheme.textSekundaer,
|
unselectedItemColor: MeloTheme.textSekundaer,
|
||||||
currentIndex: _aktiverTab.clamp(0, 3),
|
currentIndex: _aktiverTab,
|
||||||
onTap: (i) {
|
onTap: (i) {
|
||||||
|
if (i == 5) {
|
||||||
|
// Einstellungen als Screen öffnen
|
||||||
|
_oeffneEinstellungen();
|
||||||
|
return;
|
||||||
|
}
|
||||||
setState(() => _aktiverTab = i);
|
setState(() => _aktiverTab = i);
|
||||||
|
// Zurück zu Musik → Filter zurücksetzen wenn Favoriten aktiv
|
||||||
if (i == 0 && _vm.aktiveTags.contains('★ Favoriten')) {
|
if (i == 0 && _vm.aktiveTags.contains('★ Favoriten')) {
|
||||||
_vm.aktiveTags.clear();
|
_vm.aktiveTags.clear();
|
||||||
} else if (i == 2) {
|
} else if (i == 3) {
|
||||||
// Playlisten öffnen
|
_vm.aktiveTags = {'★ Favoriten'};
|
||||||
_zeigePlaylists();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
items: const [
|
items: const [
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.music_note, size: 22), label: 'Musik'),
|
BottomNavigationBarItem(icon: Icon(Icons.music_note, size: 22), label: 'Musik'),
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.add_circle, size: 22), label: 'Lied +'),
|
BottomNavigationBarItem(icon: Icon(Icons.add_circle, size: 22), label: 'Lied +'),
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.queue_music, size: 22), label: 'Playlisten'),
|
BottomNavigationBarItem(icon: Icon(Icons.label, size: 22), label: 'Tags'),
|
||||||
|
BottomNavigationBarItem(icon: Icon(Icons.favorite, size: 22), label: 'Favoriten'),
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.cloud, size: 22), label: 'Cloud'),
|
BottomNavigationBarItem(icon: Icon(Icons.cloud, size: 22), label: 'Cloud'),
|
||||||
|
BottomNavigationBarItem(icon: Icon(Icons.settings, size: 22), label: 'Einstellungen'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -769,8 +483,15 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
const Text('💌', style: TextStyle(fontSize: 20)),
|
const Text('💌', style: TextStyle(fontSize: 20)),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(_vm.nutzerBotschaft ?? '🎵 Danke fürs Zuhören!',
|
child: Column(
|
||||||
style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: Colors.white)),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Text('Seit 2008',
|
||||||
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w700, color: Colors.white)),
|
||||||
|
Text('Danke, dass du immer da bist ♥',
|
||||||
|
style: TextStyle(fontSize: 11, color: MeloTheme.textSekundaer)),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: _vm.botschaftAusblenden,
|
onTap: _vm.botschaftAusblenden,
|
||||||
@@ -781,89 +502,4 @@ class _MeloHomeState extends State<MeloHome> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Leerer Zustand – wenn keine Songs in der Bibliothek sind
|
|
||||||
Widget _emptyStateWidget() {
|
|
||||||
return Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(32),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Icon(Icons.library_music_outlined, size: 56, color: MeloTheme.rot.withValues(alpha: 0.5)),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
const Text('Noch keine Songs in Melo',
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w600)),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
const Text('Füge Songs über "Lied +" hinzu, verbinde deinen Server oder starte einen lokalen Scan.',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 12, height: 1.4)),
|
|
||||||
const SizedBox(height: 20),
|
|
||||||
ElevatedButton.icon(
|
|
||||||
onPressed: _scanMusik,
|
|
||||||
icon: const Icon(Icons.search, size: 16),
|
|
||||||
label: const Text('Jetzt Musik scannen'),
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
side: const BorderSide(color: MeloTheme.dunkel2),
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _tagBereich() {
|
|
||||||
return AnimatedSize(
|
|
||||||
duration: const Duration(milliseconds: 200),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
// Toggle-Kopf: Tag-Leiste ein-/ausklappen (war vorher unerreichbar!)
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Icon(Icons.label_outline,
|
|
||||||
size: 14, color: MeloTheme.textSekundaer),
|
|
||||||
const SizedBox(width: 6),
|
|
||||||
Text('Tags & Filter',
|
|
||||||
style: const TextStyle(
|
|
||||||
color: MeloTheme.textSekundaer, fontSize: 12)),
|
|
||||||
const Spacer(),
|
|
||||||
IconButton(
|
|
||||||
visualDensity: VisualDensity.compact,
|
|
||||||
icon: Icon(
|
|
||||||
_tagsOffen ? Icons.expand_less : Icons.expand_more,
|
|
||||||
size: 18,
|
|
||||||
color: MeloTheme.textSekundaer),
|
|
||||||
onPressed: () => setState(() => _tagsOffen = !_tagsOffen),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (_tagsOffen) ...[
|
|
||||||
TagLeiste(
|
|
||||||
tags: _vm.tags,
|
|
||||||
aktiveTags: _vm.aktiveTags,
|
|
||||||
onTagToggled: _vm.toggleTag,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
TagStatsWidget(tagCounts: _vm.tagCounts),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _statWert(String wert, String label) {
|
|
||||||
return Column(children: [
|
|
||||||
Text(wert, style: const TextStyle(color: Colors.white, fontSize: 15, fontWeight: FontWeight.w700)),
|
|
||||||
Text(label, style: const TextStyle(color: Colors.grey, fontSize: 10)),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool _tagsOffen = false;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,640 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import '../services/auth_service.dart';
|
||||||
|
import '../services/navidrome_service.dart';
|
||||||
|
import '../utils/farb_theme.dart';
|
||||||
|
import 'home_screen.dart';
|
||||||
|
|
||||||
|
/// Melo Login-Screen – Schwarz+Rot Design
|
||||||
|
/// Baka-Auth + Navidrome-Credentials
|
||||||
|
class LoginScreen extends StatefulWidget {
|
||||||
|
const LoginScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LoginScreen> createState() => _LoginScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LoginScreenState extends State<LoginScreen>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
final AuthService _auth = AuthService();
|
||||||
|
final NavidromeService _navidrome = NavidromeService();
|
||||||
|
|
||||||
|
final _userCtrl = TextEditingController();
|
||||||
|
final _passCtrl = TextEditingController();
|
||||||
|
final _urlCtrl = TextEditingController();
|
||||||
|
final _navUserCtrl = TextEditingController();
|
||||||
|
final _navPassCtrl = TextEditingController();
|
||||||
|
|
||||||
|
bool _ladt = false;
|
||||||
|
String? _status;
|
||||||
|
bool _statusOk = false;
|
||||||
|
bool _zeigeNavidrome = false;
|
||||||
|
bool _zeigeRegistrierung = false;
|
||||||
|
bool _passSichtbar = false;
|
||||||
|
bool _navPassSichtbar = false;
|
||||||
|
bool _regPassSichtbar = false;
|
||||||
|
|
||||||
|
// Registrierungs-Felder
|
||||||
|
final _regEmailCtrl = TextEditingController();
|
||||||
|
final _regUserCtrl = TextEditingController();
|
||||||
|
final _regPassCtrl = TextEditingController();
|
||||||
|
|
||||||
|
late final AnimationController _animCtrl;
|
||||||
|
late final Animation<double> _fadeAnim;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_animCtrl = AnimationController(
|
||||||
|
vsync: this,
|
||||||
|
duration: const Duration(milliseconds: 800),
|
||||||
|
);
|
||||||
|
_fadeAnim = CurvedAnimation(parent: _animCtrl, curve: Curves.easeOut);
|
||||||
|
_animCtrl.forward();
|
||||||
|
_ladeGespeicherteDaten();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _ladeGespeicherteDaten() async {
|
||||||
|
await _navidrome.ladeGespeicherteZugangsdaten();
|
||||||
|
// Navidrome-Daten für Anzeige vorbereiten
|
||||||
|
if (_navidrome.istVerbunden) {
|
||||||
|
setState(() {
|
||||||
|
_zeigeNavidrome = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_userCtrl.dispose();
|
||||||
|
_passCtrl.dispose();
|
||||||
|
_urlCtrl.dispose();
|
||||||
|
_navUserCtrl.dispose();
|
||||||
|
_navPassCtrl.dispose();
|
||||||
|
_regEmailCtrl.dispose();
|
||||||
|
_regUserCtrl.dispose();
|
||||||
|
_regPassCtrl.dispose();
|
||||||
|
_animCtrl.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _setzeStatus(String msg, {bool ok = false}) {
|
||||||
|
setState(() {
|
||||||
|
_status = msg;
|
||||||
|
_statusOk = ok;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _login() async {
|
||||||
|
final user = _userCtrl.text.trim();
|
||||||
|
final pass = _passCtrl.text.trim();
|
||||||
|
|
||||||
|
if (user.isEmpty || pass.isEmpty) {
|
||||||
|
_setzeStatus('Bitte Benutzername und Passwort eingeben');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() => _ladt = true);
|
||||||
|
_setzeStatus('Verbinde mit Baka-Auth...');
|
||||||
|
|
||||||
|
final result = await _auth.login(user, pass);
|
||||||
|
|
||||||
|
if (!mounted) return;
|
||||||
|
|
||||||
|
if (result.erfolg) {
|
||||||
|
_setzeStatus('✅ Login erfolgreich!', ok: true);
|
||||||
|
// Navidrome-Credentials speichern falls eingegeben
|
||||||
|
if (_zeigeNavidrome) {
|
||||||
|
final url = _urlCtrl.text.trim();
|
||||||
|
final nUser = _navUserCtrl.text.trim();
|
||||||
|
final nPass = _navPassCtrl.text.trim();
|
||||||
|
if (url.isNotEmpty && nUser.isNotEmpty && nPass.isNotEmpty) {
|
||||||
|
await _navidrome.speichereZugangsdaten(url, nUser, nPass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Kurz warten, dann navigieren
|
||||||
|
await Future.delayed(const Duration(milliseconds: 600));
|
||||||
|
if (mounted) {
|
||||||
|
Navigator.of(context).pushReplacement(
|
||||||
|
MaterialPageRoute(builder: (_) => const MeloHome()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_setzeStatus('❌ ${result.fehler ?? "Login fehlgeschlagen"}');
|
||||||
|
setState(() => _ladt = false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _registrieren() async {
|
||||||
|
final user = _regUserCtrl.text.trim();
|
||||||
|
final pass = _regPassCtrl.text.trim();
|
||||||
|
final email = _regEmailCtrl.text.trim();
|
||||||
|
|
||||||
|
if (user.isEmpty || pass.isEmpty) {
|
||||||
|
_setzeStatus('Bitte alle Felder ausfüllen');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() => _ladt = true);
|
||||||
|
_setzeStatus('Registriere...');
|
||||||
|
|
||||||
|
final result = await _auth.registrieren(user, pass, email);
|
||||||
|
|
||||||
|
if (!mounted) return;
|
||||||
|
|
||||||
|
if (result.erfolg) {
|
||||||
|
_setzeStatus('✅ Registrierung erfolgreich!', ok: true);
|
||||||
|
await Future.delayed(const Duration(milliseconds: 600));
|
||||||
|
if (mounted) {
|
||||||
|
Navigator.of(context).pushReplacement(
|
||||||
|
MaterialPageRoute(builder: (_) => const MeloHome()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_setzeStatus('❌ ${result.fehler ?? "Registrierung fehlgeschlagen"}');
|
||||||
|
setState(() => _ladt = false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: MeloTheme.schwarz,
|
||||||
|
body: SafeArea(
|
||||||
|
child: Center(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 24),
|
||||||
|
child: FadeTransition(
|
||||||
|
opacity: _fadeAnim,
|
||||||
|
child: _zeigeRegistrierung ? _buildRegister() : _buildLogin(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildLogin() {
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
// ─── Logo ───
|
||||||
|
_logoBereich(),
|
||||||
|
const SizedBox(height: 36),
|
||||||
|
|
||||||
|
// ─── Login-Karte ───
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: MeloTheme.rot.withValues(alpha: 0.15),
|
||||||
|
blurRadius: 30,
|
||||||
|
offset: const Offset(0, 8),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Text(
|
||||||
|
'Anmelden',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
const Text(
|
||||||
|
'Mit deinem Baka-Account',
|
||||||
|
style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 13),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
|
// Benutzername
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _userCtrl,
|
||||||
|
label: 'Benutzername',
|
||||||
|
icon: Icons.person_outline,
|
||||||
|
onSubmitted: (_) => _login(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
|
||||||
|
// Passwort
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _passCtrl,
|
||||||
|
label: 'Passwort',
|
||||||
|
icon: Icons.lock_outline,
|
||||||
|
istPasswort: true,
|
||||||
|
passSichtbar: _passSichtbar,
|
||||||
|
onPasswortToggle: () => setState(() => _passSichtbar = !_passSichtbar),
|
||||||
|
onSubmitted: (_) => _login(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
|
// Login Button
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: _ladt ? null : _login,
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: MeloTheme.rot,
|
||||||
|
disabledBackgroundColor: MeloTheme.dunkel2,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
),
|
||||||
|
elevation: 0,
|
||||||
|
),
|
||||||
|
child: _ladt
|
||||||
|
? const SizedBox(
|
||||||
|
width: 22,
|
||||||
|
height: 22,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
strokeWidth: 2.5,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: const Text(
|
||||||
|
'Anmelden',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Status
|
||||||
|
if (_status != null) ...[
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
_statusWidget(),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
|
// ─── Navidrome (optional) ───
|
||||||
|
_navidromeBereich(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
|
// ─── Registrieren Link ───
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Text(
|
||||||
|
'Noch keinen Account? ',
|
||||||
|
style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 13),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => setState(() => _zeigeRegistrierung = true),
|
||||||
|
child: const Text(
|
||||||
|
'Registrieren',
|
||||||
|
style: TextStyle(
|
||||||
|
color: MeloTheme.rot,
|
||||||
|
fontSize: 13,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
// ─── Offline-Modus ───
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).pushReplacement(
|
||||||
|
MaterialPageRoute(builder: (_) => const MeloHome()),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
'Ohne Login fortfahren',
|
||||||
|
style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildRegister() {
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
_logoBereich(klein: true),
|
||||||
|
const SizedBox(height: 28),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Text(
|
||||||
|
'Registrieren',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w700),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _regUserCtrl,
|
||||||
|
label: 'Benutzername',
|
||||||
|
icon: Icons.person_outline,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 14),
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _regEmailCtrl,
|
||||||
|
label: 'E-Mail (optional)',
|
||||||
|
icon: Icons.email_outlined,
|
||||||
|
keyboardType: TextInputType.emailAddress,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 14),
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _regPassCtrl,
|
||||||
|
label: 'Passwort',
|
||||||
|
icon: Icons.lock_outline,
|
||||||
|
istPasswort: true,
|
||||||
|
passSichtbar: _regPassSichtbar,
|
||||||
|
onPasswortToggle: () => setState(() => _regPassSichtbar = !_regPassSichtbar),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 50,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: _ladt ? null : _registrieren,
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: MeloTheme.rot,
|
||||||
|
disabledBackgroundColor: MeloTheme.dunkel2,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
||||||
|
elevation: 0,
|
||||||
|
),
|
||||||
|
child: _ladt
|
||||||
|
? const SizedBox(
|
||||||
|
width: 22, height: 22,
|
||||||
|
child: CircularProgressIndicator(strokeWidth: 2.5, color: Colors.white),
|
||||||
|
)
|
||||||
|
: const Text('Registrieren',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.w600)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
if (_status != null) ...[
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
_statusWidget(),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_zeigeRegistrierung = false;
|
||||||
|
_status = null;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
'← Zurück zum Login',
|
||||||
|
style: TextStyle(color: MeloTheme.rot, fontSize: 13, fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _logoBereich({bool klein = false}) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
// Icon
|
||||||
|
Container(
|
||||||
|
width: klein ? 64 : 80,
|
||||||
|
height: klein ? 64 : 80,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [Color(0xFFCC0000), Color(0xFF660000)],
|
||||||
|
begin: Alignment.topLeft,
|
||||||
|
end: Alignment.bottomRight,
|
||||||
|
),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: MeloTheme.rot.withValues(alpha: 0.4),
|
||||||
|
blurRadius: 24,
|
||||||
|
offset: const Offset(0, 6),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: const Center(
|
||||||
|
child: Text(
|
||||||
|
'♪',
|
||||||
|
style: TextStyle(fontSize: 36, color: Colors.white, fontWeight: FontWeight.w300),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
const Text(
|
||||||
|
'MELO',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 32,
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
letterSpacing: 6,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
'Musik. Für immer.',
|
||||||
|
style: TextStyle(
|
||||||
|
color: MeloTheme.rot.withValues(alpha: 0.8),
|
||||||
|
fontSize: 13,
|
||||||
|
letterSpacing: 2,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _navidromeBereich() {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
// Toggle
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => setState(() => _zeigeNavidrome = !_zeigeNavidrome),
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
_zeigeNavidrome ? Icons.dns : Icons.dns_outlined,
|
||||||
|
color: _zeigeNavidrome ? MeloTheme.rot : MeloTheme.textSekundaer,
|
||||||
|
size: 18,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
'🌐 Navidrome Server',
|
||||||
|
style: TextStyle(
|
||||||
|
color: _zeigeNavidrome ? Colors.white : MeloTheme.textSekundaer,
|
||||||
|
fontSize: 13,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 6),
|
||||||
|
Icon(
|
||||||
|
_zeigeNavidrome ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
||||||
|
color: MeloTheme.textSekundaer,
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Erweiterte Navidrome-Felder
|
||||||
|
if (_zeigeNavidrome) ...[
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _urlCtrl,
|
||||||
|
label: 'Server-URL',
|
||||||
|
icon: Icons.link,
|
||||||
|
hint: 'https://musik.baka-net.de',
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _navUserCtrl,
|
||||||
|
label: 'Navidrome Benutzer',
|
||||||
|
icon: Icons.person_outline,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
_eingabeFeld(
|
||||||
|
controller: _navPassCtrl,
|
||||||
|
label: 'Navidrome Passwort',
|
||||||
|
icon: Icons.lock_outline,
|
||||||
|
istPasswort: true,
|
||||||
|
passSichtbar: _navPassSichtbar,
|
||||||
|
onPasswortToggle: () => setState(() => _navPassSichtbar = !_navPassSichtbar),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _statusWidget() {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: _statusOk
|
||||||
|
? const Color(0xFF0D3B1E)
|
||||||
|
: const Color(0xFF3B0D0D),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
border: Border.all(
|
||||||
|
color: _statusOk ? const Color(0xFF2E7D32) : const Color(0xFF7D2E2E),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
_statusOk ? Icons.check_circle : Icons.error_outline,
|
||||||
|
size: 16,
|
||||||
|
color: _statusOk ? const Color(0xFF4CAF50) : const Color(0xFFEF5350),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
_status!,
|
||||||
|
style: TextStyle(
|
||||||
|
color: _statusOk ? const Color(0xFFA5D6A7) : const Color(0xFFEF9A9A),
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _eingabeFeld({
|
||||||
|
required TextEditingController controller,
|
||||||
|
required String label,
|
||||||
|
required IconData icon,
|
||||||
|
bool istPasswort = false,
|
||||||
|
bool passSichtbar = false,
|
||||||
|
VoidCallback? onPasswortToggle,
|
||||||
|
String? hint,
|
||||||
|
TextInputType keyboardType = TextInputType.text,
|
||||||
|
ValueChanged<String>? onSubmitted,
|
||||||
|
}) {
|
||||||
|
return TextField(
|
||||||
|
controller: controller,
|
||||||
|
obscureText: istPasswort && !passSichtbar,
|
||||||
|
keyboardType: keyboardType,
|
||||||
|
style: const TextStyle(color: Colors.white, fontSize: 15),
|
||||||
|
onSubmitted: onSubmitted,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: label,
|
||||||
|
hintText: hint,
|
||||||
|
hintStyle: const TextStyle(color: Color(0xFF444444), fontSize: 13),
|
||||||
|
labelStyle: const TextStyle(color: MeloTheme.textSekundaer, fontSize: 13),
|
||||||
|
prefixIcon: Icon(icon, color: MeloTheme.textSekundaer, size: 20),
|
||||||
|
filled: true,
|
||||||
|
fillColor: MeloTheme.dunkel2,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
borderSide: BorderSide.none,
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
borderSide: const BorderSide(color: MeloTheme.rot, width: 1.5),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
borderSide: const BorderSide(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||||
|
suffixIcon: istPasswort
|
||||||
|
? IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
passSichtbar ? Icons.visibility : Icons.visibility_off,
|
||||||
|
size: 18,
|
||||||
|
color: MeloTheme.textSekundaer,
|
||||||
|
),
|
||||||
|
onPressed: onPasswortToggle,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,231 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import '../config/app_config.dart';
|
||||||
|
import '../utils/farb_theme.dart';
|
||||||
|
import 'cloud_screen.dart';
|
||||||
|
import '../services/cloud_service.dart';
|
||||||
|
|
||||||
|
/// Vollwertiger Einstellungen-Screen – kein Popup mehr
|
||||||
|
class SettingsScreen extends StatefulWidget {
|
||||||
|
const SettingsScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SettingsScreen> createState() => _SettingsScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SettingsScreenState extends State<SettingsScreen> {
|
||||||
|
bool _diagnose = AppConfig.sendeDiagnosedaten;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: MeloTheme.schwarz,
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: MeloTheme.dunkel1,
|
||||||
|
leading: IconButton(
|
||||||
|
icon: const Icon(Icons.arrow_back, color: Colors.white, size: 22),
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
),
|
||||||
|
title: const Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.settings, color: MeloTheme.rot, size: 20),
|
||||||
|
SizedBox(width: 10),
|
||||||
|
Text(
|
||||||
|
'Einstellungen',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: ListView(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||||
|
children: [
|
||||||
|
// ─── Sektion: Verbindung ───
|
||||||
|
_sektionHeader('Verbindung'),
|
||||||
|
_einstellungsKachel(
|
||||||
|
icon: Icons.cloud_outlined,
|
||||||
|
titel: 'Cloud Sync',
|
||||||
|
untertitel: 'Auto-Sync, Upload & Download',
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (_) => CloudScreen(cloud: CloudService()),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
_einstellungsKachel(
|
||||||
|
icon: Icons.dns_outlined,
|
||||||
|
titel: 'Server verbinden',
|
||||||
|
untertitel: 'Navidrome Musik-Server',
|
||||||
|
onTap: () {
|
||||||
|
// Signal zum Öffnen des Server-Browsers
|
||||||
|
Navigator.pop(context, 'server');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
|
// ─── Sektion: Daten ───
|
||||||
|
_sektionHeader('Daten & Privatsphäre'),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: SwitchListTile(
|
||||||
|
title: const Text(
|
||||||
|
'Diagnosedaten senden',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 14),
|
||||||
|
),
|
||||||
|
subtitle: const Text(
|
||||||
|
'Absturz-Logs & anonyme Nutzungsdaten',
|
||||||
|
style: TextStyle(color: MeloTheme.textSekundaer, fontSize: 12),
|
||||||
|
),
|
||||||
|
value: _diagnose,
|
||||||
|
activeColor: MeloTheme.rot,
|
||||||
|
onChanged: (v) {
|
||||||
|
setState(() => _diagnose = v);
|
||||||
|
AppConfig.sendeDiagnosedaten = v;
|
||||||
|
},
|
||||||
|
secondary: const Icon(Icons.bug_report_outlined, color: MeloTheme.rot, size: 22),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
|
// ─── Sektion: Info ───
|
||||||
|
_sektionHeader('Info'),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
_infoZeile('Version', '2.31'),
|
||||||
|
const Divider(color: MeloTheme.dunkel2, height: 1),
|
||||||
|
_infoZeile('Theme', 'Schwarz + Rot'),
|
||||||
|
const Divider(color: MeloTheme.dunkel2, height: 1),
|
||||||
|
_infoZeile('Auth', AppConfig.authUrl),
|
||||||
|
const Divider(color: MeloTheme.dunkel2, height: 1),
|
||||||
|
_infoZeile('Cloud', AppConfig.cloudUrl),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
|
// ─── Abmelden ───
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 48,
|
||||||
|
child: OutlinedButton.icon(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context, 'logout');
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.logout, size: 18),
|
||||||
|
label: const Text('Abmelden', style: TextStyle(fontSize: 14)),
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
foregroundColor: MeloTheme.rot,
|
||||||
|
side: const BorderSide(color: MeloTheme.rot),
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 32),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _sektionHeader(String titel) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(4, 16, 4, 8),
|
||||||
|
child: Text(
|
||||||
|
titel,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: MeloTheme.textSekundaer,
|
||||||
|
fontSize: 11,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: 1.2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _einstellungsKachel({
|
||||||
|
required IconData icon,
|
||||||
|
required String titel,
|
||||||
|
required String untertitel,
|
||||||
|
required VoidCallback onTap,
|
||||||
|
}) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 8),
|
||||||
|
child: Material(
|
||||||
|
color: MeloTheme.dunkel1,
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(14),
|
||||||
|
border: Border.all(color: MeloTheme.dunkel2),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MeloTheme.dunkel2,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
child: Icon(icon, color: MeloTheme.rot, size: 20),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 14),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
titel,
|
||||||
|
style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 2),
|
||||||
|
Text(
|
||||||
|
untertitel,
|
||||||
|
style: const TextStyle(color: MeloTheme.textSekundaer, fontSize: 12),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Icon(Icons.chevron_right, color: MeloTheme.textSekundaer, size: 20),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _infoZeile(String label, String wert) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
style: const TextStyle(color: MeloTheme.textSekundaer, fontSize: 13),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
Text(
|
||||||
|
wert,
|
||||||
|
style: const TextStyle(color: Colors.white70, fontSize: 13),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
import '../config/app_config.dart';
|
||||||
|
import '../services/melo_logger.dart';
|
||||||
|
|
||||||
|
/// Baka-Auth Service – JWT-basierte Authentifizierung
|
||||||
|
/// Integriert mit https://baka-net.de/auth
|
||||||
|
class AuthService {
|
||||||
|
static final AuthService _instance = AuthService._();
|
||||||
|
factory AuthService() => _instance;
|
||||||
|
AuthService._();
|
||||||
|
|
||||||
|
String? _token;
|
||||||
|
String _user = '';
|
||||||
|
bool _initialisiert = false;
|
||||||
|
|
||||||
|
bool get istEingeloggt => _token != null && _token!.isNotEmpty;
|
||||||
|
String get benutzer => _user;
|
||||||
|
String? get token => _token;
|
||||||
|
|
||||||
|
/// Auth-Header für API-Requests
|
||||||
|
Map<String, String> get authHeader => {
|
||||||
|
'Authorization': 'Bearer ${_token ?? ''}',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Lädt gespeicherten Token beim App-Start
|
||||||
|
Future<void> initialisieren() async {
|
||||||
|
if (_initialisiert) return;
|
||||||
|
try {
|
||||||
|
final prefs = await SharedPreferences.getInstance();
|
||||||
|
_token = prefs.getString('baka_token');
|
||||||
|
_user = prefs.getString('baka_user') ?? '';
|
||||||
|
if (_token != null && _token!.isNotEmpty) {
|
||||||
|
MeloLogger().zustand('auth_restored', {'user': _user});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('AuthService init Fehler: $e');
|
||||||
|
}
|
||||||
|
_initialisiert = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Login über Baka-Auth-Server
|
||||||
|
/// Gibt true zurück bei Erfolg, false bei Fehler
|
||||||
|
Future<AuthResult> login(String user, String password) async {
|
||||||
|
try {
|
||||||
|
final response = await http
|
||||||
|
.post(
|
||||||
|
Uri.parse('${AppConfig.authUrl}/login'),
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: jsonEncode({
|
||||||
|
'username': user,
|
||||||
|
'password': password,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.timeout(const Duration(seconds: 10));
|
||||||
|
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
final data = jsonDecode(response.body);
|
||||||
|
_token = data['token'] as String?;
|
||||||
|
_user = user;
|
||||||
|
|
||||||
|
if (_token != null && _token!.isNotEmpty) {
|
||||||
|
// Token speichern
|
||||||
|
final prefs = await SharedPreferences.getInstance();
|
||||||
|
await prefs.setString('baka_token', _token!);
|
||||||
|
await prefs.setString('baka_user', _user);
|
||||||
|
|
||||||
|
MeloLogger().aktion('auth_login_ok', {'user': _user});
|
||||||
|
return AuthResult.ok;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fehler vom Server parsen
|
||||||
|
String fehler = 'Unbekannter Fehler';
|
||||||
|
try {
|
||||||
|
final data = jsonDecode(response.body);
|
||||||
|
fehler = data['error'] as String? ?? 'Login fehlgeschlagen (${response.statusCode})';
|
||||||
|
} catch (_) {
|
||||||
|
fehler = 'Server nicht erreichbar (${response.statusCode})';
|
||||||
|
}
|
||||||
|
|
||||||
|
MeloLogger().fehler('auth_login_fail', fehler);
|
||||||
|
return AuthResult.fehlgeschlagen(fehler);
|
||||||
|
} catch (e) {
|
||||||
|
final msg = 'Keine Verbindung zum Auth-Server';
|
||||||
|
MeloLogger().fehler('auth_login_error', e);
|
||||||
|
return AuthResult.fehlgeschlagen(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Registrierung über Baka-Auth-Server
|
||||||
|
Future<AuthResult> registrieren(String user, String password, String email) async {
|
||||||
|
try {
|
||||||
|
final response = await http
|
||||||
|
.post(
|
||||||
|
Uri.parse('${AppConfig.authUrl}/register'),
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: jsonEncode({
|
||||||
|
'username': user,
|
||||||
|
'password': password,
|
||||||
|
'email': email,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.timeout(const Duration(seconds: 10));
|
||||||
|
|
||||||
|
if (response.statusCode == 200 || response.statusCode == 201) {
|
||||||
|
final data = jsonDecode(response.body);
|
||||||
|
_token = data['token'] as String?;
|
||||||
|
_user = user;
|
||||||
|
|
||||||
|
if (_token != null && _token!.isNotEmpty) {
|
||||||
|
final prefs = await SharedPreferences.getInstance();
|
||||||
|
await prefs.setString('baka_token', _token!);
|
||||||
|
await prefs.setString('baka_user', _user);
|
||||||
|
|
||||||
|
MeloLogger().aktion('auth_register_ok', {'user': _user});
|
||||||
|
return AuthResult.ok;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String fehler = 'Registrierung fehlgeschlagen';
|
||||||
|
try {
|
||||||
|
final data = jsonDecode(response.body);
|
||||||
|
fehler = data['error'] as String? ?? fehler;
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
|
return AuthResult.fehlgeschlagen(fehler);
|
||||||
|
} catch (e) {
|
||||||
|
return AuthResult.fehlgeschlagen('Keine Verbindung zum Server');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Token beim Server validieren
|
||||||
|
Future<bool> tokenPruefen() async {
|
||||||
|
if (_token == null) return false;
|
||||||
|
try {
|
||||||
|
final response = await http
|
||||||
|
.get(
|
||||||
|
Uri.parse('${AppConfig.authUrl}/verify'),
|
||||||
|
headers: authHeader,
|
||||||
|
)
|
||||||
|
.timeout(const Duration(seconds: 5));
|
||||||
|
return response.statusCode == 200;
|
||||||
|
} catch (_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Ausloggen – Token löschen
|
||||||
|
Future<void> logout() async {
|
||||||
|
_token = null;
|
||||||
|
_user = '';
|
||||||
|
final prefs = await SharedPreferences.getInstance();
|
||||||
|
await prefs.remove('baka_token');
|
||||||
|
await prefs.remove('baka_user');
|
||||||
|
MeloLogger().aktion('auth_logout', {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Ergebnis eines Auth-Versuchs
|
||||||
|
class AuthResult {
|
||||||
|
final bool erfolg;
|
||||||
|
final String? fehler;
|
||||||
|
|
||||||
|
const AuthResult._(this.erfolg, this.fehler);
|
||||||
|
|
||||||
|
static const ok = AuthResult._(true, null);
|
||||||
|
static AuthResult fehlgeschlagen(String msg) => AuthResult._(false, msg);
|
||||||
|
}
|
||||||
@@ -1,101 +1,44 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
|
||||||
import '../config/app_config.dart';
|
import '../config/app_config.dart';
|
||||||
|
import '../services/auth_service.dart';
|
||||||
import '../services/melo_logger.dart';
|
import '../services/melo_logger.dart';
|
||||||
|
|
||||||
/// Cloud-Sync Service für Melo Registry.
|
/// Cloud-Sync Service für Melo Registry
|
||||||
/// Auth: Bearer-JWT vom Baka-Auth-Server (Login mit Nutzername + Passwort).
|
/// Authentifizierung via Baka-Auth JWT-Token
|
||||||
/// Der alte X-API-Key/X-User-Mechanismus wurde entfernt (IDOR-Lücke).
|
|
||||||
class CloudService {
|
class CloudService {
|
||||||
static final CloudService _instanz = CloudService._();
|
|
||||||
factory CloudService() => _instanz;
|
|
||||||
CloudService._();
|
|
||||||
|
|
||||||
static String get _base => AppConfig.cloudUrl;
|
static String get _base => AppConfig.cloudUrl;
|
||||||
static String get _authBase => AppConfig.authUrl;
|
|
||||||
|
|
||||||
String _user = '';
|
String _user = '';
|
||||||
String _token = '';
|
|
||||||
|
|
||||||
/// Token liegt verschlüsselt im Keychain/Keystore (flutter_secure_storage) —
|
/// Login mit Baka-Auth – Token wird aus AuthService bezogen
|
||||||
/// nicht mehr im Klartext in SharedPreferences (Security-Audit CRIT-1).
|
Future<bool> login(String user) async {
|
||||||
static const _secure = FlutterSecureStorage();
|
_user = user;
|
||||||
|
|
||||||
String get user => _user;
|
|
||||||
String get token => _token;
|
|
||||||
bool get istAngemeldet => _token.isNotEmpty;
|
|
||||||
|
|
||||||
/// Echter Login gegen den Baka-Auth-Server.
|
|
||||||
/// Der Token wird gespeichert und bei allen Cloud-Calls als
|
|
||||||
/// Authorization: Bearer `token` mitgeschickt.
|
|
||||||
Future<bool> login(String user, String pass) async {
|
|
||||||
try {
|
try {
|
||||||
final r = await http
|
final r = await http
|
||||||
.post(Uri.parse('$_authBase/login'),
|
.get(Uri.parse('$_base/api/cloud/status'),
|
||||||
headers: {'Content-Type': 'application/json'},
|
headers: _authHeader)
|
||||||
body: jsonEncode({'username': user, 'password': pass}))
|
.timeout(const Duration(seconds: 5));
|
||||||
.timeout(const Duration(seconds: 10));
|
return r.statusCode == 200;
|
||||||
if (r.statusCode == 200) {
|
} catch (_) {
|
||||||
final d = jsonDecode(r.body);
|
|
||||||
if (d['status'] == 'ok' && d['token'] != null) {
|
|
||||||
_user = d['username'] as String? ?? user;
|
|
||||||
_token = d['token'] as String;
|
|
||||||
await _speichereToken();
|
|
||||||
MeloLogger.cloudToken = _token;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (_) {}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Stellt gespeicherten Token wieder her (Auto-Login nach App-Start).
|
|
||||||
/// Migriert einmalig alte SharedPreferences-Einträge in SecureStorage.
|
|
||||||
Future<bool> restoreLogin() async {
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
|
||||||
var t = await _secure.read(key: 'melo_cloud_token') ?? '';
|
|
||||||
var u = await _secure.read(key: 'melo_cloud_user') ?? '';
|
|
||||||
// Migration alter Versionen (Token lag früher in SharedPreferences)
|
|
||||||
if (t.isEmpty) {
|
|
||||||
final altT = prefs.getString('melo_cloud_token') ?? '';
|
|
||||||
final altU = prefs.getString('melo_cloud_user') ?? '';
|
|
||||||
if (altT.isNotEmpty) {
|
|
||||||
t = altT;
|
|
||||||
u = altU;
|
|
||||||
await _secure.write(key: 'melo_cloud_token', value: t);
|
|
||||||
if (u.isNotEmpty) {
|
|
||||||
await _secure.write(key: 'melo_cloud_user', value: u);
|
|
||||||
}
|
|
||||||
await prefs.remove('melo_cloud_token');
|
|
||||||
await prefs.remove('melo_cloud_user');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (t.isEmpty) return false;
|
|
||||||
_token = t;
|
|
||||||
_user = u;
|
|
||||||
MeloLogger.cloudToken = t;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> logout() async {
|
Map<String, String> get _authHeader {
|
||||||
_token = '';
|
final token = AuthService().token;
|
||||||
_user = '';
|
final headers = <String, String>{
|
||||||
MeloLogger.cloudToken = null;
|
'X-API-Key': AppConfig.ytProxyApiKey,
|
||||||
await _secure.delete(key: 'melo_cloud_token');
|
|
||||||
await _secure.delete(key: 'melo_cloud_user');
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _speichereToken() async {
|
|
||||||
await _secure.write(key: 'melo_cloud_token', value: _token);
|
|
||||||
await _secure.write(key: 'melo_cloud_user', value: _user);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, String> get _authHeader => {
|
|
||||||
if (_token.isNotEmpty) 'Authorization': 'Bearer $_token',
|
|
||||||
};
|
};
|
||||||
|
if (_user.isNotEmpty) {
|
||||||
|
headers['X-User'] = _user;
|
||||||
|
}
|
||||||
|
// Baka-Auth JWT Token mitsenden falls vorhanden
|
||||||
|
if (token != null && token.isNotEmpty) {
|
||||||
|
headers['Authorization'] = 'Bearer $token';
|
||||||
|
}
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
Future<Map?> status() => _get('/api/cloud/status');
|
Future<Map?> status() => _get('/api/cloud/status');
|
||||||
|
|
||||||
@@ -126,11 +69,7 @@ class CloudService {
|
|||||||
headers: _authHeader)
|
headers: _authHeader)
|
||||||
.timeout(const Duration(seconds: 120));
|
.timeout(const Duration(seconds: 120));
|
||||||
if (r.statusCode == 200) {
|
if (r.statusCode == 200) {
|
||||||
final file = File(destPath);
|
await File(destPath).writeAsBytes(r.bodyBytes);
|
||||||
if (!await file.parent.exists()) {
|
|
||||||
await file.parent.create(recursive: true);
|
|
||||||
}
|
|
||||||
await file.writeAsBytes(r.bodyBytes);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -229,26 +168,4 @@ class CloudService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Löscht alle Cloud-Songs des angemeldeten Users (inkl. Server-Dateien).
|
|
||||||
Future<bool> loescheMusik() async {
|
|
||||||
return _postOhneBody('/api/cloud/delete-music');
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Löscht ALLE Cloud-Daten des Users (Musik + Shares + Ordner).
|
|
||||||
Future<bool> loescheAlles() async {
|
|
||||||
return _postOhneBody('/api/cloud/delete-all');
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<bool> _postOhneBody(String path) async {
|
|
||||||
try {
|
|
||||||
final r = await http
|
|
||||||
.post(Uri.parse('$_base$path'),
|
|
||||||
headers: {..._authHeader, 'Content-Type': 'application/json'})
|
|
||||||
.timeout(const Duration(seconds: 30));
|
|
||||||
return r.statusCode == 200;
|
|
||||||
} catch (_) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,11 @@ import 'dart:convert';
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:path/path.dart' as p;
|
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import '../models/song.dart';
|
import '../models/song.dart';
|
||||||
import '../database/db_helper.dart';
|
import '../database/db_helper.dart';
|
||||||
import 'melo_logger.dart';
|
import 'melo_logger.dart';
|
||||||
import 'cloud_service.dart';
|
import '../config/app_config.dart';
|
||||||
|
|
||||||
/// Download-Service: Lädt YouTube-Audio über den yt-proxy herunter.
|
/// Download-Service: Lädt YouTube-Audio über den yt-proxy herunter.
|
||||||
/// Nutzt ChangeNotifier für UI-Updates via ListenableBuilder.
|
/// Nutzt ChangeNotifier für UI-Updates via ListenableBuilder.
|
||||||
@@ -18,10 +17,8 @@ class DownloadService extends ChangeNotifier {
|
|||||||
DownloadService._();
|
DownloadService._();
|
||||||
|
|
||||||
static const String _proxyBasisUrl = 'https://yt.baka-net.de';
|
static const String _proxyBasisUrl = 'https://yt.baka-net.de';
|
||||||
static Map<String, String> get _authHeader {
|
static String get _apiKey => AppConfig.ytProxyApiKey;
|
||||||
final t = CloudService().token;
|
static Map<String, String> get _authHeader => {'X-API-Key': _apiKey};
|
||||||
return {if (t.isNotEmpty) 'Authorization': 'Bearer $t'};
|
|
||||||
}
|
|
||||||
|
|
||||||
final DbHelper _db = DbHelper();
|
final DbHelper _db = DbHelper();
|
||||||
|
|
||||||
@@ -150,14 +147,6 @@ class DownloadService extends ChangeNotifier {
|
|||||||
String? dateiPfad;
|
String? dateiPfad;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Login-Check: yt-proxy verlangt jetzt einen gültigen Cloud-Token
|
|
||||||
if (!CloudService().istAngemeldet) {
|
|
||||||
_fehler = 'Bitte zuerst in der Cloud anmelden (Cloud-Tab)';
|
|
||||||
_ladt = false;
|
|
||||||
notifyListeners();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// URL-Validierung
|
// URL-Validierung
|
||||||
if (!url.contains('youtube.com') && !url.contains('youtu.be')) {
|
if (!url.contains('youtube.com') && !url.contains('youtu.be')) {
|
||||||
_fehler = 'Keine gültige YouTube-URL';
|
_fehler = 'Keine gültige YouTube-URL';
|
||||||
@@ -250,8 +239,8 @@ class DownloadService extends ChangeNotifier {
|
|||||||
: Directory('${(await getApplicationDocumentsDirectory()).path}/music');
|
: Directory('${(await getApplicationDocumentsDirectory()).path}/music');
|
||||||
if (!await dir.exists()) await dir.create(recursive: true);
|
if (!await dir.exists()) await dir.create(recursive: true);
|
||||||
|
|
||||||
// Sicheren Dateinamen erstellen (p.basename verhindert Path-Traversal)
|
// Sicheren Dateinamen erstellen
|
||||||
final safeName = p.basename(titel).replaceAll(RegExp(r'[^\w\s-]'), '').trim();
|
final safeName = titel.replaceAll(RegExp(r'[^\w\s-]'), '').trim();
|
||||||
final lokalerName = '${safeName.isEmpty ? "song" : safeName}.mp3';
|
final lokalerName = '${safeName.isEmpty ? "song" : safeName}.mp3';
|
||||||
dateiPfad = '${dir.path}/$lokalerName';
|
dateiPfad = '${dir.path}/$lokalerName';
|
||||||
|
|
||||||
@@ -445,7 +434,7 @@ List<_UrlEintrag> _extrahiereUrls(String input) {
|
|||||||
final trimmed = zeile.trim();
|
final trimmed = zeile.trim();
|
||||||
if (trimmed.isEmpty) continue;
|
if (trimmed.isEmpty) continue;
|
||||||
|
|
||||||
if (trimmed.contains('list=')) {
|
if (trimmed.contains('playlist') || trimmed.contains('list=')) {
|
||||||
result.add(_UrlEintrag(trimmed, '📋 Playlist'));
|
result.add(_UrlEintrag(trimmed, '📋 Playlist'));
|
||||||
} else if (trimmed.contains('youtube.com') || trimmed.contains('youtu.be')) {
|
} else if (trimmed.contains('youtube.com') || trimmed.contains('youtu.be')) {
|
||||||
result.add(_UrlEintrag(trimmed, '🎵 Song'));
|
result.add(_UrlEintrag(trimmed, '🎵 Song'));
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:math';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:crypto/crypto.dart';
|
import 'package:crypto/crypto.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:path/path.dart' as p;
|
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import '../models/song.dart';
|
import '../models/song.dart';
|
||||||
import '../database/db_helper.dart';
|
import '../database/db_helper.dart';
|
||||||
|
|
||||||
@@ -66,10 +64,6 @@ class SubsonicAlbum {
|
|||||||
class NavidromeService {
|
class NavidromeService {
|
||||||
final DbHelper _db = DbHelper();
|
final DbHelper _db = DbHelper();
|
||||||
|
|
||||||
/// Passwort & Zugangsdaten liegen verschlüsselt im Keychain/Keystore
|
|
||||||
/// (flutter_secure_storage) statt im Klartext in SharedPreferences.
|
|
||||||
static const _secure = FlutterSecureStorage();
|
|
||||||
|
|
||||||
String _serverUrl = '';
|
String _serverUrl = '';
|
||||||
String _user = '';
|
String _user = '';
|
||||||
String _password = '';
|
String _password = '';
|
||||||
@@ -83,17 +77,16 @@ class NavidromeService {
|
|||||||
_serverUrl = url.endsWith('/') ? url.substring(0, url.length - 1) : url;
|
_serverUrl = url.endsWith('/') ? url.substring(0, url.length - 1) : url;
|
||||||
_user = user;
|
_user = user;
|
||||||
_password = password;
|
_password = password;
|
||||||
// Kryptographisch sicherer Salt (vorher millisecondsSinceEpoch = vorhersagbar)
|
_salt = DateTime.now().millisecondsSinceEpoch.toString();
|
||||||
final rng = Random.secure();
|
|
||||||
_salt = base64Encode(List.generate(16, (_) => rng.nextInt(256)));
|
|
||||||
_token = md5.convert(utf8.encode(_password + _salt)).toString();
|
_token = md5.convert(utf8.encode(_password + _salt)).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> ladeGespeicherteZugangsdaten() async {
|
Future<void> ladeGespeicherteZugangsdaten() async {
|
||||||
try {
|
try {
|
||||||
final url = await _secure.read(key: 'navidrome_url');
|
final prefs = await SharedPreferences.getInstance();
|
||||||
final user = await _secure.read(key: 'navidrome_user');
|
final url = prefs.getString('navidrome_url');
|
||||||
final pass = await _secure.read(key: 'navidrome_pass');
|
final user = prefs.getString('navidrome_user');
|
||||||
|
final pass = prefs.getString('navidrome_pass');
|
||||||
if (url != null && user != null && pass != null && url.isNotEmpty) {
|
if (url != null && user != null && pass != null && url.isNotEmpty) {
|
||||||
setCredentials(url, user, pass);
|
setCredentials(url, user, pass);
|
||||||
}
|
}
|
||||||
@@ -105,9 +98,10 @@ class NavidromeService {
|
|||||||
Future<void> speichereZugangsdaten(String url, String user, String password) async {
|
Future<void> speichereZugangsdaten(String url, String user, String password) async {
|
||||||
setCredentials(url, user, password);
|
setCredentials(url, user, password);
|
||||||
try {
|
try {
|
||||||
await _secure.write(key: 'navidrome_url', value: url);
|
final prefs = await SharedPreferences.getInstance();
|
||||||
await _secure.write(key: 'navidrome_user', value: user);
|
await prefs.setString('navidrome_url', url);
|
||||||
await _secure.write(key: 'navidrome_pass', value: password);
|
await prefs.setString('navidrome_user', user);
|
||||||
|
await prefs.setString('navidrome_pass', password);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('Fehler beim Speichern der Navidrome-Zugangsdaten: $e');
|
debugPrint('Fehler beim Speichern der Navidrome-Zugangsdaten: $e');
|
||||||
}
|
}
|
||||||
@@ -184,7 +178,7 @@ class NavidromeService {
|
|||||||
final musikDir = Directory('${dir.path}/music');
|
final musikDir = Directory('${dir.path}/music');
|
||||||
if (!await musikDir.exists()) await musikDir.create(recursive: true);
|
if (!await musikDir.exists()) await musikDir.create(recursive: true);
|
||||||
|
|
||||||
final safeName = p.basename(s.titel).replaceAll(RegExp(r'[^\w\s-]'), '').trim();
|
final safeName = s.titel.replaceAll(RegExp(r'[^\w\s-]'), '').trim();
|
||||||
final kurzId = s.id.length > 8 ? s.id.substring(0, 8) : s.id;
|
final kurzId = s.id.length > 8 ? s.id.substring(0, 8) : s.id;
|
||||||
final dateiName = '${safeName.isEmpty ? "song" : safeName}_$kurzId.mp3';
|
final dateiName = '${safeName.isEmpty ? "song" : safeName}_$kurzId.mp3';
|
||||||
final dateiPfad = '${musikDir.path}/$dateiName';
|
final dateiPfad = '${musikDir.path}/$dateiName';
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:path/path.dart' as p;
|
|
||||||
import '../database/db_helper.dart';
|
import '../database/db_helper.dart';
|
||||||
import '../services/player_service.dart';
|
import '../services/player_service.dart';
|
||||||
import '../services/musik_scanner.dart';
|
import '../services/musik_scanner.dart';
|
||||||
@@ -8,11 +7,6 @@ import '../services/favoriten_service.dart';
|
|||||||
import '../services/download_service.dart';
|
import '../services/download_service.dart';
|
||||||
import '../services/navidrome_service.dart';
|
import '../services/navidrome_service.dart';
|
||||||
import '../services/playlist_service.dart';
|
import '../services/playlist_service.dart';
|
||||||
import '../services/cloud_service.dart';
|
|
||||||
import '../services/melo_logger.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
|
||||||
import 'package:path_provider/path_provider.dart';
|
|
||||||
import 'dart:io';
|
|
||||||
import '../models/song.dart';
|
import '../models/song.dart';
|
||||||
import '../models/tag.dart';
|
import '../models/tag.dart';
|
||||||
|
|
||||||
@@ -24,8 +18,6 @@ class MeloHomeViewModel extends ChangeNotifier {
|
|||||||
final DownloadService downloader = DownloadService();
|
final DownloadService downloader = DownloadService();
|
||||||
final NavidromeService navidrome = NavidromeService();
|
final NavidromeService navidrome = NavidromeService();
|
||||||
final PlaylistService playlists = PlaylistService();
|
final PlaylistService playlists = PlaylistService();
|
||||||
final CloudService cloud = CloudService();
|
|
||||||
Timer? _autoSyncTimer;
|
|
||||||
|
|
||||||
List<Song> songs = [];
|
List<Song> songs = [];
|
||||||
Set<String> aktiveTags = {};
|
Set<String> aktiveTags = {};
|
||||||
@@ -42,19 +34,6 @@ class MeloHomeViewModel extends ChangeNotifier {
|
|||||||
|
|
||||||
int _playCount = 0;
|
int _playCount = 0;
|
||||||
static const int _botschaftSchwellwert = 10;
|
static const int _botschaftSchwellwert = 10;
|
||||||
String? _nutzerBotschaft;
|
|
||||||
|
|
||||||
/// Per-User Easteregg-Botschaften
|
|
||||||
static const _botschaften = {
|
|
||||||
'Baka': '💌 Seit 2008 – Danke, dass du immer da bist ♥',
|
|
||||||
'Tinker': '🎀 Für meine beste Freundin – Melo & Melo 💕',
|
|
||||||
};
|
|
||||||
|
|
||||||
String? get nutzerBotschaft => _nutzerBotschaft;
|
|
||||||
|
|
||||||
void setzeNutzer(String name) {
|
|
||||||
_nutzerBotschaft = _botschaften[name];
|
|
||||||
}
|
|
||||||
StreamSubscription<Duration>? _positionsSub;
|
StreamSubscription<Duration>? _positionsSub;
|
||||||
int _letzteGespeicherteSekunde = -1;
|
int _letzteGespeicherteSekunde = -1;
|
||||||
|
|
||||||
@@ -87,10 +66,10 @@ class MeloHomeViewModel extends ChangeNotifier {
|
|||||||
if (aktiveTags.contains('★ Favoriten')) {
|
if (aktiveTags.contains('★ Favoriten')) {
|
||||||
return songs.where((s) => s.id != null && favoritenIds.contains(s.id)).toList();
|
return songs.where((s) => s.id != null && favoritenIds.contains(s.id)).toList();
|
||||||
}
|
}
|
||||||
// Filter: Songs mit ALLEN aktiven Tags (AND-Logik)
|
// Filter: Songs mit mindestens einem der aktiven Tags
|
||||||
return songs.where((s) {
|
return songs.where((s) {
|
||||||
if (s.tagIds == null) return false;
|
if (s.tagIds == null) return false;
|
||||||
return aktiveTags.every((tagName) {
|
return aktiveTags.any((tagName) {
|
||||||
final tag = _tagsMap[tagName];
|
final tag = _tagsMap[tagName];
|
||||||
return tag != null && s.tagIds!.contains(tag.id);
|
return tag != null && s.tagIds!.contains(tag.id);
|
||||||
});
|
});
|
||||||
@@ -102,22 +81,29 @@ class MeloHomeViewModel extends ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Auto-Restore der Navidrome-Session beim Start
|
var alle = await db.alleSongs();
|
||||||
// Dummies bereinigen
|
|
||||||
await db.alteDummiesLoeschen();
|
|
||||||
|
|
||||||
await navidrome.ladeGespeicherteZugangsdaten();
|
if (alle.isEmpty) {
|
||||||
if (navidrome.istVerbunden) {
|
final beispiele = [
|
||||||
ladeNavidromeAlben();
|
Song(titel: 'Leichtes Gepäck', kuenstler: 'Silbermond', album: 'Schritte',
|
||||||
|
dauerSekunden: 232, dateiPfad: '', groesseBytes: 5242880, istHeruntergeladen: true),
|
||||||
|
Song(titel: 'Auf uns', kuenstler: 'Andreas Bourani', album: 'Hey',
|
||||||
|
dauerSekunden: 241, dateiPfad: '', groesseBytes: 4819200, istHeruntergeladen: true),
|
||||||
|
Song(titel: '80 Millionen', kuenstler: 'Max Giesinger', album: 'Der Junge',
|
||||||
|
dauerSekunden: 225, dateiPfad: '', groesseBytes: 5107200, istHeruntergeladen: true),
|
||||||
|
Song(titel: 'Tage wie diese', kuenstler: 'Die Toten Hosen', album: 'Ballast',
|
||||||
|
dauerSekunden: 252, dateiPfad: '', groesseBytes: 4300800, istHeruntergeladen: true),
|
||||||
|
Song(titel: 'Atlantis', kuenstler: 'Frida Gold', album: 'Liebe',
|
||||||
|
dauerSekunden: 228, dateiPfad: '', groesseBytes: 3987200, istHeruntergeladen: true),
|
||||||
|
];
|
||||||
|
await db.songsEinfuegen(beispiele);
|
||||||
|
alle = await db.alleSongs();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Echte Songs aus SQLite laden (ohne unspielbare Fake-Dummies)
|
songs = alle;
|
||||||
songs = await db.alleSongs();
|
|
||||||
|
|
||||||
favoritenIds = await favoriten.favoritenIds();
|
favoritenIds = await favoriten.favoritenIds();
|
||||||
letzteSongs = await db.letzteWiedergaben();
|
letzteSongs = await db.letzteWiedergaben();
|
||||||
await ladeTags();
|
await ladeTags();
|
||||||
_starteCloudSyncScheduler();
|
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
debugPrint('ladeSongs Fehler: $e\n$stack');
|
debugPrint('ladeSongs Fehler: $e\n$stack');
|
||||||
}
|
}
|
||||||
@@ -282,43 +268,8 @@ class MeloHomeViewModel extends ChangeNotifier {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_autoSyncTimer?.cancel();
|
|
||||||
_positionsSub?.cancel();
|
_positionsSub?.cancel();
|
||||||
player.dispose();
|
player.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _starteCloudSyncScheduler() async {
|
|
||||||
_autoSyncTimer?.cancel();
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
|
||||||
final autoSync = prefs.getBool('cloud_auto') ?? true;
|
|
||||||
final intervalStunden = prefs.getInt('cloud_interval') ?? 6;
|
|
||||||
|
|
||||||
if (!autoSync || intervalStunden <= 0) return;
|
|
||||||
|
|
||||||
_autoSyncTimer = Timer.periodic(Duration(hours: intervalStunden), (_) async {
|
|
||||||
try {
|
|
||||||
await cloud.restoreLogin();
|
|
||||||
if (!cloud.istAngemeldet) return;
|
|
||||||
final serverSongs = await cloud.listSongs();
|
|
||||||
if (serverSongs.isEmpty) return;
|
|
||||||
|
|
||||||
// Nur neue Songs herunterladen
|
|
||||||
final dir = Directory('${(await getApplicationDocumentsDirectory()).path}/music');
|
|
||||||
if (!await dir.exists()) await dir.create(recursive: true);
|
|
||||||
final localFiles = dir.listSync().whereType<File>()
|
|
||||||
.map((f) => f.path.split('/').last).toSet();
|
|
||||||
|
|
||||||
for (final s in serverSongs) {
|
|
||||||
final title = p.basename(s['title'].toString());
|
|
||||||
if (localFiles.contains(title)) continue; // schon lokal
|
|
||||||
await cloud.download(s['id'].toString(), '${dir.path}/$title');
|
|
||||||
}
|
|
||||||
|
|
||||||
await ladeSongs(); // UI aktualisieren
|
|
||||||
} catch (e) {
|
|
||||||
MeloLogger().fehler('background_auto_sync', e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ class SongTile extends StatelessWidget {
|
|||||||
final ValueChanged<Song> onPlay;
|
final ValueChanged<Song> onPlay;
|
||||||
final VoidCallback onMetadataChanged;
|
final VoidCallback onMetadataChanged;
|
||||||
final ValueChanged<Song>? onAddToPlaylist;
|
final ValueChanged<Song>? onAddToPlaylist;
|
||||||
final ValueChanged<Song>? onDelete;
|
|
||||||
|
|
||||||
const SongTile({
|
const SongTile({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -22,7 +21,6 @@ class SongTile extends StatelessWidget {
|
|||||||
required this.onPlay,
|
required this.onPlay,
|
||||||
required this.onMetadataChanged,
|
required this.onMetadataChanged,
|
||||||
this.onAddToPlaylist,
|
this.onAddToPlaylist,
|
||||||
this.onDelete,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -64,19 +62,14 @@ class SongTile extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
borderRadius: BorderRadius.circular(50),
|
borderRadius: BorderRadius.circular(50),
|
||||||
onTap: () {
|
onTap: () => showDialog(
|
||||||
// Guard gegen null-ID (defensive)
|
|
||||||
final id = song.id;
|
|
||||||
if (id == null) return;
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
context: context,
|
||||||
builder: (_) => TagAuswahlDialog(
|
builder: (_) => TagAuswahlDialog(
|
||||||
songId: id,
|
songId: song.id!,
|
||||||
songTitel: song.titel,
|
songTitel: song.titel,
|
||||||
onChanged: onMetadataChanged,
|
onChanged: onMetadataChanged,
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(6),
|
padding: const EdgeInsets.all(6),
|
||||||
child: const Icon(Icons.label_outline, size: 14, color: MeloTheme.textSekundaer),
|
child: const Icon(Icons.label_outline, size: 14, color: MeloTheme.textSekundaer),
|
||||||
@@ -106,39 +99,6 @@ class SongTile extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: hatDatei ? () => onPlay(song) : null,
|
onTap: hatDatei ? () => onPlay(song) : null,
|
||||||
onLongPress: onDelete != null ? () {
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
backgroundColor: MeloTheme.dunkel1,
|
|
||||||
builder: (ctx) => SafeArea(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.edit, color: Colors.white),
|
|
||||||
title: const Text('Bearbeiten', style: TextStyle(color: Colors.white)),
|
|
||||||
onTap: () async {
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
final geaendert = await showDialog<bool>(
|
|
||||||
context: context,
|
|
||||||
builder: (_) => MetadatenDialog(song: song),
|
|
||||||
);
|
|
||||||
if (geaendert == true) onMetadataChanged();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Icons.delete, color: Colors.red),
|
|
||||||
title: const Text('Löschen', style: TextStyle(color: Colors.red)),
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(ctx);
|
|
||||||
onDelete!(song);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} : null,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
PODS:
|
||||||
|
- FlutterMacOS (1.0.0)
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
FlutterMacOS:
|
||||||
|
:path: Flutter/ephemeral
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Flutter-related
|
||||||
|
**/Flutter/ephemeral/
|
||||||
|
**/Pods/
|
||||||
|
|
||||||
|
# Xcode-related
|
||||||
|
**/dgph
|
||||||
|
**/xcuserdata/
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||||
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||||
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
import FlutterMacOS
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
import audio_service
|
||||||
|
import audio_session
|
||||||
|
import just_audio
|
||||||
|
import shared_preferences_foundation
|
||||||
|
import sqflite_darwin
|
||||||
|
|
||||||
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
|
AudioServicePlugin.register(with: registry.registrar(forPlugin: "AudioServicePlugin"))
|
||||||
|
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
|
||||||
|
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
|
||||||
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
platform :osx, '10.15'
|
||||||
|
|
||||||
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
|
project 'Runner', {
|
||||||
|
'Debug' => :debug,
|
||||||
|
'Profile' => :release,
|
||||||
|
'Release' => :release,
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutter_root
|
||||||
|
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
|
||||||
|
unless File.exist?(generated_xcode_build_settings_path)
|
||||||
|
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
|
||||||
|
end
|
||||||
|
|
||||||
|
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||||
|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||||
|
return matches[1].strip if matches
|
||||||
|
end
|
||||||
|
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
|
||||||
|
end
|
||||||
|
|
||||||
|
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||||
|
|
||||||
|
flutter_macos_podfile_setup
|
||||||
|
|
||||||
|
target 'Runner' do
|
||||||
|
use_frameworks!
|
||||||
|
|
||||||
|
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
||||||
|
target 'RunnerTests' do
|
||||||
|
inherit! :search_paths
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
post_install do |installer|
|
||||||
|
installer.pods_project.targets.each do |target|
|
||||||
|
flutter_additional_macos_build_settings(target)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
PODS:
|
||||||
|
- FlutterMacOS (1.0.0)
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
FlutterMacOS:
|
||||||
|
:path: Flutter/ephemeral
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
@@ -0,0 +1,807 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 54;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXAggregateTarget section */
|
||||||
|
33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
|
||||||
|
buildPhases = (
|
||||||
|
33CC111E2044C6BF0003C045 /* ShellScript */,
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "Flutter Assemble";
|
||||||
|
productName = FLX;
|
||||||
|
};
|
||||||
|
/* End PBXAggregateTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
1EF72F07E3D3681C335406C6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D7FA51371D4CBFC6AC9FA5 /* Pods_Runner.framework */; };
|
||||||
|
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
|
||||||
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
||||||
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
||||||
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||||
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||||
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||||
|
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
|
||||||
|
AACBA3FB82C466C0D0D0B64E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C91015B35802EC0E8670BAF /* Pods_RunnerTests.framework */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
|
||||||
|
remoteInfo = Runner;
|
||||||
|
};
|
||||||
|
33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 33CC111A2044C6BA0003C045;
|
||||||
|
remoteInfo = FLX;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
33CC110E2044A8840003C045 /* Bundle Framework */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 10;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
name = "Bundle Framework";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||||
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||||
|
33CC10ED2044A3C60003C045 /* melo_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = melo_app.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
|
33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; };
|
||||||
|
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; };
|
||||||
|
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||||
|
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||||
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||||
|
3C91015B35802EC0E8670BAF /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
55F71C7DFDB20C59BF73EAD7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
5762EDC4B2221CFE992C3EE3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
6B469B40C5E42E480AF52E74 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
93F65671892C523CB8CBD7CF /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
C57627DB9855C4DEF21E18BA /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
D24D7755018E213035056554 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
D3D7FA51371D4CBFC6AC9FA5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
331C80D2294CF70F00263BE5 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
AACBA3FB82C466C0D0D0B64E /* Pods_RunnerTests.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10EA2044A3C60003C045 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
|
||||||
|
1EF72F07E3D3681C335406C6 /* Pods_Runner.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
331C80D6294CF71000263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */,
|
||||||
|
);
|
||||||
|
path = RunnerTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33BA886A226E78AF003329D5 /* Configs */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */,
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Configs;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC10E42044A3C60003C045 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33FAB671232836740065AC1E /* Runner */,
|
||||||
|
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||||
|
331C80D6294CF71000263BE5 /* RunnerTests */,
|
||||||
|
33CC10EE2044A3C60003C045 /* Products */,
|
||||||
|
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||||
|
D18E7E1F246ADA1C0D73B904 /* Pods */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10ED2044A3C60003C045 /* melo_app.app */,
|
||||||
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC11242044D66E0003C045 /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F22044A3C60003C045 /* Assets.xcassets */,
|
||||||
|
33CC10F42044A3C60003C045 /* MainMenu.xib */,
|
||||||
|
33CC10F72044A3C60003C045 /* Info.plist */,
|
||||||
|
);
|
||||||
|
name = Resources;
|
||||||
|
path = ..;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CEB47122A05771004F2AC0 /* Flutter */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
|
||||||
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
|
||||||
|
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
|
||||||
|
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
|
||||||
|
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Flutter;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33FAB671232836740065AC1E /* Runner */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
|
||||||
|
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
|
||||||
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
|
||||||
|
33E51914231749380026EE4D /* Release.entitlements */,
|
||||||
|
33CC11242044D66E0003C045 /* Resources */,
|
||||||
|
33BA886A226E78AF003329D5 /* Configs */,
|
||||||
|
);
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
D18E7E1F246ADA1C0D73B904 /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
55F71C7DFDB20C59BF73EAD7 /* Pods-Runner.debug.xcconfig */,
|
||||||
|
5762EDC4B2221CFE992C3EE3 /* Pods-Runner.release.xcconfig */,
|
||||||
|
6B469B40C5E42E480AF52E74 /* Pods-Runner.profile.xcconfig */,
|
||||||
|
93F65671892C523CB8CBD7CF /* Pods-RunnerTests.debug.xcconfig */,
|
||||||
|
C57627DB9855C4DEF21E18BA /* Pods-RunnerTests.release.xcconfig */,
|
||||||
|
D24D7755018E213035056554 /* Pods-RunnerTests.profile.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Pods;
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
D3D7FA51371D4CBFC6AC9FA5 /* Pods_Runner.framework */,
|
||||||
|
3C91015B35802EC0E8670BAF /* Pods_RunnerTests.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
|
buildPhases = (
|
||||||
|
42029007D2624CC971333D31 /* [CP] Check Pods Manifest.lock */,
|
||||||
|
331C80D1294CF70F00263BE5 /* Sources */,
|
||||||
|
331C80D2294CF70F00263BE5 /* Frameworks */,
|
||||||
|
331C80D3294CF70F00263BE5 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
331C80DA294CF71000263BE5 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = RunnerTests;
|
||||||
|
productName = RunnerTests;
|
||||||
|
productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
|
||||||
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
|
};
|
||||||
|
33CC10EC2044A3C60003C045 /* Runner */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
|
buildPhases = (
|
||||||
|
3995B6E9A2D4E69AFEF97BBA /* [CP] Check Pods Manifest.lock */,
|
||||||
|
33CC10E92044A3C60003C045 /* Sources */,
|
||||||
|
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||||
|
33CC10EB2044A3C60003C045 /* Resources */,
|
||||||
|
33CC110E2044A8840003C045 /* Bundle Framework */,
|
||||||
|
3399D490228B24CF009A79C7 /* ShellScript */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
33CC11202044C79F0003C045 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = Runner;
|
||||||
|
packageProductDependencies = (
|
||||||
|
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
|
||||||
|
);
|
||||||
|
productName = Runner;
|
||||||
|
productReference = 33CC10ED2044A3C60003C045 /* melo_app.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
33CC10E52044A3C60003C045 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = YES;
|
||||||
|
LastSwiftUpdateCheck = 0920;
|
||||||
|
LastUpgradeCheck = 1510;
|
||||||
|
ORGANIZATIONNAME = "";
|
||||||
|
TargetAttributes = {
|
||||||
|
331C80D4294CF70F00263BE5 = {
|
||||||
|
CreatedOnToolsVersion = 14.0;
|
||||||
|
TestTargetID = 33CC10EC2044A3C60003C045;
|
||||||
|
};
|
||||||
|
33CC10EC2044A3C60003C045 = {
|
||||||
|
CreatedOnToolsVersion = 9.2;
|
||||||
|
LastSwiftMigration = 1100;
|
||||||
|
ProvisioningStyle = Automatic;
|
||||||
|
SystemCapabilities = {
|
||||||
|
com.apple.Sandbox = {
|
||||||
|
enabled = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
33CC111A2044C6BA0003C045 = {
|
||||||
|
CreatedOnToolsVersion = 9.2;
|
||||||
|
ProvisioningStyle = Manual;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 33CC10E42044A3C60003C045;
|
||||||
|
packageReferences = (
|
||||||
|
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
|
||||||
|
);
|
||||||
|
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
33CC10EC2044A3C60003C045 /* Runner */,
|
||||||
|
331C80D4294CF70F00263BE5 /* RunnerTests */,
|
||||||
|
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
331C80D3294CF70F00263BE5 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10EB2044A3C60003C045 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
|
||||||
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
||||||
|
};
|
||||||
|
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
Flutter/ephemeral/FlutterInputs.xcfilelist,
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
Flutter/ephemeral/tripwire,
|
||||||
|
);
|
||||||
|
outputFileListPaths = (
|
||||||
|
Flutter/ephemeral/FlutterOutputs.xcfilelist,
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||||
|
};
|
||||||
|
3995B6E9A2D4E69AFEF97BBA /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
42029007D2624CC971333D31 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
331C80D1294CF70F00263BE5 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10E92044A3C60003C045 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
|
||||||
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
|
||||||
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 33CC10EC2044A3C60003C045 /* Runner */;
|
||||||
|
targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
|
||||||
|
targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F52044A3C60003C045 /* Base */,
|
||||||
|
);
|
||||||
|
name = MainMenu.xib;
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
331C80DB294CF71000263BE5 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 93F65671892C523CB8CBD7CF /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/melo_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/melo_app";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
331C80DC294CF71000263BE5 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = C57627DB9855C4DEF21E18BA /* Pods-RunnerTests.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/melo_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/melo_app";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
331C80DD294CF71000263BE5 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = D24D7755018E213035056554 /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/melo_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/melo_app";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CE9231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
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_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
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_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CEA231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CEB231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
33CC10F92044A3C60003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
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_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
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_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC10FA2044A3C60003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
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_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
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_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
33CC10FC2044A3C60003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC10FD2044A3C60003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
33CC111C2044C6BA0003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC111D2044C6BA0003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
331C80DB294CF71000263BE5 /* Debug */,
|
||||||
|
331C80DC294CF71000263BE5 /* Release */,
|
||||||
|
331C80DD294CF71000263BE5 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC10F92044A3C60003C045 /* Debug */,
|
||||||
|
33CC10FA2044A3C60003C045 /* Release */,
|
||||||
|
338D0CE9231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC10FC2044A3C60003C045 /* Debug */,
|
||||||
|
33CC10FD2044A3C60003C045 /* Release */,
|
||||||
|
338D0CEA231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC111C2044C6BA0003C045 /* Debug */,
|
||||||
|
33CC111D2044C6BA0003C045 /* Release */,
|
||||||
|
338D0CEB231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
|
/* Begin XCLocalSwiftPackageReference section */
|
||||||
|
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
|
||||||
|
isa = XCLocalSwiftPackageReference;
|
||||||
|
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
|
||||||
|
};
|
||||||
|
/* End XCLocalSwiftPackageReference section */
|
||||||
|
|
||||||
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
|
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
productName = FlutterGeneratedPluginSwiftPackage;
|
||||||
|
};
|
||||||
|
/* End XCSwiftPackageProductDependency section */
|
||||||
|
};
|
||||||
|
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1510"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<PreActions>
|
||||||
|
<ExecutionAction
|
||||||
|
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
|
||||||
|
<ActionContent
|
||||||
|
title = "Run Prepare Flutter Framework Script"
|
||||||
|
scriptText = ""$FLUTTER_ROOT"/packages/flutter_tools/bin/macos_assemble.sh prepare ">
|
||||||
|
<EnvironmentBuildable>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</EnvironmentBuildable>
|
||||||
|
</ActionContent>
|
||||||
|
</ExecutionAction>
|
||||||
|
</PreActions>
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.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">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO"
|
||||||
|
parallelizable = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
|
||||||
|
BuildableName = "RunnerTests.xctest"
|
||||||
|
BlueprintName = "RunnerTests"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
enableGPUValidationMode = "1"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Profile"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:Runner.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
|
||||||
|
@main
|
||||||
|
class AppDelegate: FlutterAppDelegate {
|
||||||
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"size" : "16x16",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_16.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "16x16",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_32.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "32x32",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_32.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "32x32",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_64.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "128x128",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_128.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "128x128",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_256.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "256x256",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_256.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "256x256",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_512.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_512.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_1024.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,343 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="macosx"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
|
||||||
|
</connections>
|
||||||
|
</customObject>
|
||||||
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
|
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/>
|
||||||
|
<outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
|
||||||
|
</connections>
|
||||||
|
</customObject>
|
||||||
|
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||||
|
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||||
|
<items>
|
||||||
|
<menuItem title="APP_NAME" id="1Xt-HY-uBw">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr">
|
||||||
|
<items>
|
||||||
|
<menuItem title="About APP_NAME" id="5kV-Vb-QxS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||||
|
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||||
|
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||||
|
<menuItem title="Services" id="NMo-om-nkz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||||
|
<menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN">
|
||||||
|
<connections>
|
||||||
|
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||||
|
<menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi">
|
||||||
|
<connections>
|
||||||
|
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||||
|
<connections>
|
||||||
|
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||||
|
<connections>
|
||||||
|
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||||
|
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||||
|
<connections>
|
||||||
|
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||||
|
<connections>
|
||||||
|
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||||
|
<connections>
|
||||||
|
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||||
|
<connections>
|
||||||
|
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||||
|
<menuItem title="Find" id="4EN-yA-p0u">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||||
|
<connections>
|
||||||
|
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||||
|
<connections>
|
||||||
|
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||||
|
<connections>
|
||||||
|
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||||
|
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||||
|
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="View" id="H8h-7b-M4v">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Window" id="aUF-d1-5bR">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||||
|
<connections>
|
||||||
|
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||||
|
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Help" id="EPT-qC-fAb">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
<point key="canvasLocation" x="142" y="-258"/>
|
||||||
|
</menu>
|
||||||
|
<window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
|
||||||
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
|
<rect key="contentRect" x="335" y="390" width="800" height="600"/>
|
||||||
|
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
|
||||||
|
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
</view>
|
||||||
|
</window>
|
||||||
|
</objects>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// Application-level settings for the Runner target.
|
||||||
|
//
|
||||||
|
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
|
||||||
|
// future. If not, the values below would default to using the project name when this becomes a
|
||||||
|
// 'flutter create' template.
|
||||||
|
|
||||||
|
// The application's name. By default this is also the title of the Flutter window.
|
||||||
|
PRODUCT_NAME = melo_app
|
||||||
|
|
||||||
|
// The application's bundle identifier
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp
|
||||||
|
|
||||||
|
// The copyright displayed in application information
|
||||||
|
PRODUCT_COPYRIGHT = Copyright © 2026 com.melo. All rights reserved.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "../../Flutter/Flutter-Debug.xcconfig"
|
||||||
|
#include "Warnings.xcconfig"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "../../Flutter/Flutter-Release.xcconfig"
|
||||||
|
#include "Warnings.xcconfig"
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES
|
||||||
|
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
|
||||||
|
CLANG_WARN_PRAGMA_PACK = YES
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES
|
||||||
|
CLANG_WARN_COMMA = YES
|
||||||
|
GCC_WARN_STRICT_SELECTOR_MATCH = YES
|
||||||
|
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
|
||||||
|
GCC_WARN_SHADOW = YES
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?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>com.apple.security.app-sandbox</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.server</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>$(PRODUCT_COPYRIGHT)</string>
|
||||||
|
<key>NSMainNibFile</key>
|
||||||
|
<string>MainMenu</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
|
||||||
|
class MainFlutterWindow: NSWindow {
|
||||||
|
override func awakeFromNib() {
|
||||||
|
let flutterViewController = FlutterViewController()
|
||||||
|
let windowFrame = self.frame
|
||||||
|
self.contentViewController = flutterViewController
|
||||||
|
self.setFrame(windowFrame, display: true)
|
||||||
|
|
||||||
|
RegisterGeneratedPlugins(registry: flutterViewController)
|
||||||
|
|
||||||
|
super.awakeFromNib()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>com.apple.security.app-sandbox</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
import XCTest
|
||||||
|
|
||||||
|
class RunnerTests: XCTestCase {
|
||||||
|
|
||||||
|
func testExample() {
|
||||||
|
// If you add code to the Runner application, consider adding tests here.
|
||||||
|
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Flutter-related
|
||||||
|
**/Flutter/ephemeral/
|
||||||
|
**/Pods/
|
||||||
|
|
||||||
|
# Xcode-related
|
||||||
|
**/dgph
|
||||||
|
**/xcuserdata/
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||||
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||||
|
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// Generated file. Do not edit.
|
||||||
|
//
|
||||||
|
|
||||||
|
import FlutterMacOS
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
import audio_service
|
||||||
|
import audio_session
|
||||||
|
import just_audio
|
||||||
|
import shared_preferences_foundation
|
||||||
|
import sqflite_darwin
|
||||||
|
|
||||||
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
|
AudioServicePlugin.register(with: registry.registrar(forPlugin: "AudioServicePlugin"))
|
||||||
|
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
|
||||||
|
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
|
||||||
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
platform :osx, '10.15'
|
||||||
|
|
||||||
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
|
project 'Runner', {
|
||||||
|
'Debug' => :debug,
|
||||||
|
'Profile' => :release,
|
||||||
|
'Release' => :release,
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutter_root
|
||||||
|
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
|
||||||
|
unless File.exist?(generated_xcode_build_settings_path)
|
||||||
|
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
|
||||||
|
end
|
||||||
|
|
||||||
|
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||||
|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||||
|
return matches[1].strip if matches
|
||||||
|
end
|
||||||
|
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
|
||||||
|
end
|
||||||
|
|
||||||
|
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||||
|
|
||||||
|
flutter_macos_podfile_setup
|
||||||
|
|
||||||
|
target 'Runner' do
|
||||||
|
use_frameworks!
|
||||||
|
|
||||||
|
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
||||||
|
target 'RunnerTests' do
|
||||||
|
inherit! :search_paths
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
post_install do |installer|
|
||||||
|
installer.pods_project.targets.each do |target|
|
||||||
|
flutter_additional_macos_build_settings(target)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
PODS:
|
||||||
|
- FlutterMacOS (1.0.0)
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
FlutterMacOS:
|
||||||
|
:path: Flutter/ephemeral
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
@@ -0,0 +1,807 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 54;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXAggregateTarget section */
|
||||||
|
33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
|
||||||
|
buildPhases = (
|
||||||
|
33CC111E2044C6BF0003C045 /* ShellScript */,
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "Flutter Assemble";
|
||||||
|
productName = FLX;
|
||||||
|
};
|
||||||
|
/* End PBXAggregateTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
1EF72F07E3D3681C335406C6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D7FA51371D4CBFC6AC9FA5 /* Pods_Runner.framework */; };
|
||||||
|
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
|
||||||
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
||||||
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
||||||
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||||
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||||
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||||
|
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
|
||||||
|
AACBA3FB82C466C0D0D0B64E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C91015B35802EC0E8670BAF /* Pods_RunnerTests.framework */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
|
||||||
|
remoteInfo = Runner;
|
||||||
|
};
|
||||||
|
33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 33CC111A2044C6BA0003C045;
|
||||||
|
remoteInfo = FLX;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
33CC110E2044A8840003C045 /* Bundle Framework */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 10;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
name = "Bundle Framework";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||||
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||||
|
33CC10ED2044A3C60003C045 /* melo_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = melo_app.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
|
33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; };
|
||||||
|
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; };
|
||||||
|
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||||
|
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||||
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||||
|
3C91015B35802EC0E8670BAF /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
55F71C7DFDB20C59BF73EAD7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
5762EDC4B2221CFE992C3EE3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
6B469B40C5E42E480AF52E74 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
93F65671892C523CB8CBD7CF /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
C57627DB9855C4DEF21E18BA /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
D24D7755018E213035056554 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
D3D7FA51371D4CBFC6AC9FA5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
331C80D2294CF70F00263BE5 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
AACBA3FB82C466C0D0D0B64E /* Pods_RunnerTests.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10EA2044A3C60003C045 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
|
||||||
|
1EF72F07E3D3681C335406C6 /* Pods_Runner.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
331C80D6294CF71000263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */,
|
||||||
|
);
|
||||||
|
path = RunnerTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33BA886A226E78AF003329D5 /* Configs */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */,
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Configs;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC10E42044A3C60003C045 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33FAB671232836740065AC1E /* Runner */,
|
||||||
|
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||||
|
331C80D6294CF71000263BE5 /* RunnerTests */,
|
||||||
|
33CC10EE2044A3C60003C045 /* Products */,
|
||||||
|
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||||
|
D18E7E1F246ADA1C0D73B904 /* Pods */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10ED2044A3C60003C045 /* melo_app.app */,
|
||||||
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CC11242044D66E0003C045 /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F22044A3C60003C045 /* Assets.xcassets */,
|
||||||
|
33CC10F42044A3C60003C045 /* MainMenu.xib */,
|
||||||
|
33CC10F72044A3C60003C045 /* Info.plist */,
|
||||||
|
);
|
||||||
|
name = Resources;
|
||||||
|
path = ..;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33CEB47122A05771004F2AC0 /* Flutter */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
|
||||||
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
|
||||||
|
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
|
||||||
|
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
|
||||||
|
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Flutter;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
33FAB671232836740065AC1E /* Runner */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
|
||||||
|
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
|
||||||
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
|
||||||
|
33E51914231749380026EE4D /* Release.entitlements */,
|
||||||
|
33CC11242044D66E0003C045 /* Resources */,
|
||||||
|
33BA886A226E78AF003329D5 /* Configs */,
|
||||||
|
);
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
D18E7E1F246ADA1C0D73B904 /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
55F71C7DFDB20C59BF73EAD7 /* Pods-Runner.debug.xcconfig */,
|
||||||
|
5762EDC4B2221CFE992C3EE3 /* Pods-Runner.release.xcconfig */,
|
||||||
|
6B469B40C5E42E480AF52E74 /* Pods-Runner.profile.xcconfig */,
|
||||||
|
93F65671892C523CB8CBD7CF /* Pods-RunnerTests.debug.xcconfig */,
|
||||||
|
C57627DB9855C4DEF21E18BA /* Pods-RunnerTests.release.xcconfig */,
|
||||||
|
D24D7755018E213035056554 /* Pods-RunnerTests.profile.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Pods;
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
D3D7FA51371D4CBFC6AC9FA5 /* Pods_Runner.framework */,
|
||||||
|
3C91015B35802EC0E8670BAF /* Pods_RunnerTests.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
|
buildPhases = (
|
||||||
|
42029007D2624CC971333D31 /* [CP] Check Pods Manifest.lock */,
|
||||||
|
331C80D1294CF70F00263BE5 /* Sources */,
|
||||||
|
331C80D2294CF70F00263BE5 /* Frameworks */,
|
||||||
|
331C80D3294CF70F00263BE5 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
331C80DA294CF71000263BE5 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = RunnerTests;
|
||||||
|
productName = RunnerTests;
|
||||||
|
productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
|
||||||
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
|
};
|
||||||
|
33CC10EC2044A3C60003C045 /* Runner */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
|
buildPhases = (
|
||||||
|
3995B6E9A2D4E69AFEF97BBA /* [CP] Check Pods Manifest.lock */,
|
||||||
|
33CC10E92044A3C60003C045 /* Sources */,
|
||||||
|
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||||
|
33CC10EB2044A3C60003C045 /* Resources */,
|
||||||
|
33CC110E2044A8840003C045 /* Bundle Framework */,
|
||||||
|
3399D490228B24CF009A79C7 /* ShellScript */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
33CC11202044C79F0003C045 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = Runner;
|
||||||
|
packageProductDependencies = (
|
||||||
|
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
|
||||||
|
);
|
||||||
|
productName = Runner;
|
||||||
|
productReference = 33CC10ED2044A3C60003C045 /* melo_app.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
33CC10E52044A3C60003C045 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = YES;
|
||||||
|
LastSwiftUpdateCheck = 0920;
|
||||||
|
LastUpgradeCheck = 1510;
|
||||||
|
ORGANIZATIONNAME = "";
|
||||||
|
TargetAttributes = {
|
||||||
|
331C80D4294CF70F00263BE5 = {
|
||||||
|
CreatedOnToolsVersion = 14.0;
|
||||||
|
TestTargetID = 33CC10EC2044A3C60003C045;
|
||||||
|
};
|
||||||
|
33CC10EC2044A3C60003C045 = {
|
||||||
|
CreatedOnToolsVersion = 9.2;
|
||||||
|
LastSwiftMigration = 1100;
|
||||||
|
ProvisioningStyle = Automatic;
|
||||||
|
SystemCapabilities = {
|
||||||
|
com.apple.Sandbox = {
|
||||||
|
enabled = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
33CC111A2044C6BA0003C045 = {
|
||||||
|
CreatedOnToolsVersion = 9.2;
|
||||||
|
ProvisioningStyle = Manual;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 33CC10E42044A3C60003C045;
|
||||||
|
packageReferences = (
|
||||||
|
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
|
||||||
|
);
|
||||||
|
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
33CC10EC2044A3C60003C045 /* Runner */,
|
||||||
|
331C80D4294CF70F00263BE5 /* RunnerTests */,
|
||||||
|
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
331C80D3294CF70F00263BE5 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10EB2044A3C60003C045 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
|
||||||
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
||||||
|
};
|
||||||
|
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
Flutter/ephemeral/FlutterInputs.xcfilelist,
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
Flutter/ephemeral/tripwire,
|
||||||
|
);
|
||||||
|
outputFileListPaths = (
|
||||||
|
Flutter/ephemeral/FlutterOutputs.xcfilelist,
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||||
|
};
|
||||||
|
3995B6E9A2D4E69AFEF97BBA /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
42029007D2624CC971333D31 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
331C80D1294CF70F00263BE5 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
33CC10E92044A3C60003C045 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
|
||||||
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
|
||||||
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 33CC10EC2044A3C60003C045 /* Runner */;
|
||||||
|
targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
|
||||||
|
targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
33CC10F52044A3C60003C045 /* Base */,
|
||||||
|
);
|
||||||
|
name = MainMenu.xib;
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
331C80DB294CF71000263BE5 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 93F65671892C523CB8CBD7CF /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/melo_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/melo_app";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
331C80DC294CF71000263BE5 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = C57627DB9855C4DEF21E18BA /* Pods-RunnerTests.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/melo_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/melo_app";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
331C80DD294CF71000263BE5 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = D24D7755018E213035056554 /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/melo_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/melo_app";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CE9231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
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_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
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_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CEA231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
338D0CEB231458BD00FA5F75 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
33CC10F92044A3C60003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
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_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
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_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
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_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC10FA2044A3C60003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
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_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
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_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEAD_CODE_STRIPPING = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
33CC10FC2044A3C60003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC10FD2044A3C60003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
);
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
33CC111C2044C6BA0003C045 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Manual;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
33CC111D2044C6BA0003C045 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
331C80DB294CF71000263BE5 /* Debug */,
|
||||||
|
331C80DC294CF71000263BE5 /* Release */,
|
||||||
|
331C80DD294CF71000263BE5 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC10F92044A3C60003C045 /* Debug */,
|
||||||
|
33CC10FA2044A3C60003C045 /* Release */,
|
||||||
|
338D0CE9231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC10FC2044A3C60003C045 /* Debug */,
|
||||||
|
33CC10FD2044A3C60003C045 /* Release */,
|
||||||
|
338D0CEA231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
33CC111C2044C6BA0003C045 /* Debug */,
|
||||||
|
33CC111D2044C6BA0003C045 /* Release */,
|
||||||
|
338D0CEB231458BD00FA5F75 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
|
/* Begin XCLocalSwiftPackageReference section */
|
||||||
|
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
|
||||||
|
isa = XCLocalSwiftPackageReference;
|
||||||
|
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
|
||||||
|
};
|
||||||
|
/* End XCLocalSwiftPackageReference section */
|
||||||
|
|
||||||
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
|
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
productName = FlutterGeneratedPluginSwiftPackage;
|
||||||
|
};
|
||||||
|
/* End XCSwiftPackageProductDependency section */
|
||||||
|
};
|
||||||
|
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1510"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<PreActions>
|
||||||
|
<ExecutionAction
|
||||||
|
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
|
||||||
|
<ActionContent
|
||||||
|
title = "Run Prepare Flutter Framework Script"
|
||||||
|
scriptText = ""$FLUTTER_ROOT"/packages/flutter_tools/bin/macos_assemble.sh prepare ">
|
||||||
|
<EnvironmentBuildable>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</EnvironmentBuildable>
|
||||||
|
</ActionContent>
|
||||||
|
</ExecutionAction>
|
||||||
|
</PreActions>
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.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">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO"
|
||||||
|
parallelizable = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
|
||||||
|
BuildableName = "RunnerTests.xctest"
|
||||||
|
BlueprintName = "RunnerTests"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
enableGPUValidationMode = "1"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Profile"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
|
BuildableName = "melo_app.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:Runner.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@@ -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>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
|
||||||
|
@main
|
||||||
|
class AppDelegate: FlutterAppDelegate {
|
||||||
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"size" : "16x16",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_16.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "16x16",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_32.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "32x32",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_32.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "32x32",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_64.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "128x128",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_128.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "128x128",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_256.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "256x256",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_256.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "256x256",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_512.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_512.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "512x512",
|
||||||
|
"idiom" : "mac",
|
||||||
|
"filename" : "app_icon_1024.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,343 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="macosx"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
|
||||||
|
</connections>
|
||||||
|
</customObject>
|
||||||
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
|
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/>
|
||||||
|
<outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
|
||||||
|
</connections>
|
||||||
|
</customObject>
|
||||||
|
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||||
|
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||||
|
<items>
|
||||||
|
<menuItem title="APP_NAME" id="1Xt-HY-uBw">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr">
|
||||||
|
<items>
|
||||||
|
<menuItem title="About APP_NAME" id="5kV-Vb-QxS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||||
|
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||||
|
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||||
|
<menuItem title="Services" id="NMo-om-nkz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||||
|
<menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN">
|
||||||
|
<connections>
|
||||||
|
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||||
|
<menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi">
|
||||||
|
<connections>
|
||||||
|
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||||
|
<connections>
|
||||||
|
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||||
|
<connections>
|
||||||
|
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||||
|
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||||
|
<connections>
|
||||||
|
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||||
|
<connections>
|
||||||
|
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||||
|
<connections>
|
||||||
|
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||||
|
<connections>
|
||||||
|
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||||
|
<menuItem title="Find" id="4EN-yA-p0u">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||||
|
<connections>
|
||||||
|
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||||
|
<connections>
|
||||||
|
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||||
|
<connections>
|
||||||
|
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||||
|
<connections>
|
||||||
|
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||||
|
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||||
|
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="View" id="H8h-7b-M4v">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Window" id="aUF-d1-5bR">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||||
|
<connections>
|
||||||
|
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||||
|
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Help" id="EPT-qC-fAb">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
<point key="canvasLocation" x="142" y="-258"/>
|
||||||
|
</menu>
|
||||||
|
<window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
|
||||||
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
|
<rect key="contentRect" x="335" y="390" width="800" height="600"/>
|
||||||
|
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
|
||||||
|
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
</view>
|
||||||
|
</window>
|
||||||
|
</objects>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// Application-level settings for the Runner target.
|
||||||
|
//
|
||||||
|
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
|
||||||
|
// future. If not, the values below would default to using the project name when this becomes a
|
||||||
|
// 'flutter create' template.
|
||||||
|
|
||||||
|
// The application's name. By default this is also the title of the Flutter window.
|
||||||
|
PRODUCT_NAME = melo_app
|
||||||
|
|
||||||
|
// The application's bundle identifier
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.melo.meloApp
|
||||||
|
|
||||||
|
// The copyright displayed in application information
|
||||||
|
PRODUCT_COPYRIGHT = Copyright © 2026 com.melo. All rights reserved.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "../../Flutter/Flutter-Debug.xcconfig"
|
||||||
|
#include "Warnings.xcconfig"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#include "../../Flutter/Flutter-Release.xcconfig"
|
||||||
|
#include "Warnings.xcconfig"
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES
|
||||||
|
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
|
||||||
|
CLANG_WARN_PRAGMA_PACK = YES
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES
|
||||||
|
CLANG_WARN_COMMA = YES
|
||||||
|
GCC_WARN_STRICT_SELECTOR_MATCH = YES
|
||||||
|
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
|
||||||
|
GCC_WARN_SHADOW = YES
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?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>com.apple.security.app-sandbox</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.server</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>$(PRODUCT_COPYRIGHT)</string>
|
||||||
|
<key>NSMainNibFile</key>
|
||||||
|
<string>MainMenu</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
|
||||||
|
class MainFlutterWindow: NSWindow {
|
||||||
|
override func awakeFromNib() {
|
||||||
|
let flutterViewController = FlutterViewController()
|
||||||
|
let windowFrame = self.frame
|
||||||
|
self.contentViewController = flutterViewController
|
||||||
|
self.setFrame(windowFrame, display: true)
|
||||||
|
|
||||||
|
RegisterGeneratedPlugins(registry: flutterViewController)
|
||||||
|
|
||||||
|
super.awakeFromNib()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>com.apple.security.app-sandbox</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import Cocoa
|
||||||
|
import FlutterMacOS
|
||||||
|
import XCTest
|
||||||
|
|
||||||
|
class RunnerTests: XCTestCase {
|
||||||
|
|
||||||
|
func testExample() {
|
||||||
|
// If you add code to the Runner application, consider adding tests here.
|
||||||
|
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
import 'package:melo_app/models/song.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
group('Song Model', () {
|
||||||
|
test('toMap / fromMap roundtrip', () {
|
||||||
|
final song = Song(
|
||||||
|
id: 1,
|
||||||
|
titel: 'Test Song',
|
||||||
|
kuenstler: 'Test Artist',
|
||||||
|
album: 'Test Album',
|
||||||
|
dauerSekunden: 180,
|
||||||
|
dateiPfad: '/music/test.mp3',
|
||||||
|
groesseBytes: 5242880,
|
||||||
|
istHeruntergeladen: true,
|
||||||
|
downloadQuelle: 'local',
|
||||||
|
);
|
||||||
|
|
||||||
|
final map = song.toMap();
|
||||||
|
final restored = Song.fromMap(map);
|
||||||
|
|
||||||
|
expect(restored.titel, song.titel);
|
||||||
|
expect(restored.kuenstler, song.kuenstler);
|
||||||
|
expect(restored.album, song.album);
|
||||||
|
expect(restored.dauerSekunden, song.dauerSekunden);
|
||||||
|
expect(restored.dateiPfad, song.dateiPfad);
|
||||||
|
expect(restored.groesseBytes, song.groesseBytes);
|
||||||
|
expect(restored.istHeruntergeladen, song.istHeruntergeladen);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('dauerFormatiert formats correctly', () {
|
||||||
|
final song = Song(
|
||||||
|
titel: 'Test', kuenstler: 'T', dauerSekunden: 125, dateiPfad: '',
|
||||||
|
);
|
||||||
|
expect(song.dauerFormatiert, '2:05');
|
||||||
|
|
||||||
|
final short = Song(
|
||||||
|
titel: 'Test', kuenstler: 'T', dauerSekunden: 7, dateiPfad: '',
|
||||||
|
);
|
||||||
|
expect(short.dauerFormatiert, '0:07');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||