mucke/lib/presentation/pages/library_page.dart

44 lines
1.1 KiB
Dart
Raw Normal View History

2020-03-28 09:39:59 +01:00
import 'package:flutter/material.dart';
import '../state/music_store.dart';
2020-03-28 11:08:43 +01:00
import 'albums_page.dart';
2020-03-28 09:39:59 +01:00
class LibraryPage extends StatelessWidget {
const LibraryPage({Key key, @required this.store}) : super(key: key);
final MusicStore store;
@override
2020-03-28 11:08:43 +01:00
Widget build(BuildContext context) => DefaultTabController(
length: 3,
child: SafeArea(
child: Column(
children: <Widget>[
const TabBar(
tabs: <Tab>[
Tab(
text: 'Artists',
2020-03-28 09:39:59 +01:00
),
2020-03-28 11:08:43 +01:00
Tab(
text: 'Albums',
2020-03-28 09:39:59 +01:00
),
2020-03-28 11:08:43 +01:00
Tab(
text: 'Songs',
),
],
),
Expanded(
child: TabBarView(
children: <Widget>[
const Center(child: Text('Artists')),
AlbumsPage(store: store),
const Center(child: Text('Songs')),
],
),
)
],
),
),
);
2020-03-28 09:39:59 +01:00
}