summaryrefslogtreecommitdiff
path: root/player-android/lib/main.dart
blob: eed6e9955fb4ad8ff93a6b66097663bdf50b0018 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import 'package:flutter/material.dart';

void main() => runApp(const PlayerAndroidApp());

class PlayerAndroidApp extends StatelessWidget {
  const PlayerAndroidApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Player',
      initialRoute: '/',
      routes: {
        '/': (context) => const HomeScreen(),
        '/now-playing': (context) => const NowPlayingScreen(),
      },
    );
  }
}

// HomeScreen shows the media library. Placeholder until the library API is wired.
class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Library')),
      body: Center(
        child: ElevatedButton(
          onPressed: () => Navigator.pushNamed(context, '/now-playing'),
          child: const Text('Now Playing'),
        ),
      ),
    );
  }
}

// NowPlayingScreen shows the active media item. Placeholder until playback is wired.
class NowPlayingScreen extends StatelessWidget {
  const NowPlayingScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Now Playing')),
      body: const Center(child: Text('No media selected')),
    );
  }
}