musicus_mobile/lib/screens/home.dart

50 lines
1.3 KiB
Dart
Raw Normal View History

2019-12-02 21:05:49 +01:00
import 'package:flutter/material.dart';
import '../backend.dart';
2019-12-04 20:48:55 +01:00
import '../selectors/person.dart';
import '../selectors/instruments.dart';
2019-12-02 21:05:49 +01:00
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
final backend = Backend.of(context);
return Scaffold(
appBar: AppBar(
title: Text('Musicus'),
),
// For debugging purposes
body: ListView(
children: <Widget>[
ListTile(
title: Text('Start player'),
onTap: backend.startPlayer,
),
ListTile(
title: Text('Play/Pause'),
onTap: backend.playPause,
),
2019-12-04 20:48:55 +01:00
ListTile(
title: Text('Select person'),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PersonsSelector(),
fullscreenDialog: true,
)),
),
ListTile(
title: Text('Select instrument'),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InstrumentsSelector(),
fullscreenDialog: true,
)),
),
2019-12-02 21:05:49 +01:00
],
),
);
}
}