mucke/lib/presentation/pages/library_tab_container.dart

53 lines
1.3 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'albums_page.dart';
2020-08-08 19:02:03 +02:00
import 'artists_page.dart';
import 'songs_page.dart';
class LibraryTabContainer extends StatelessWidget {
const LibraryTabContainer({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: SafeArea(
child: Column(
children: <Widget>[
Container(
2020-05-09 19:46:06 +02:00
color: Theme.of(context).primaryColor,
child: const TabBar(
tabs: <Tab>[
Tab(
text: 'Artists',
),
Tab(
text: 'Albums',
),
Tab(
text: 'Songs',
),
],
),
),
2020-05-09 19:46:06 +02:00
const Expanded(
child: TabBarView(
children: <Widget>[
2020-08-08 19:02:03 +02:00
ArtistsPage(
key: PageStorageKey('ArtistsPage'),
),
AlbumsPage(
key: PageStorageKey('AlbumsPage'),
),
SongsPage(
key: PageStorageKey('SongsPage'),
),
],
),
)
],
),
),
);
}
}