mucke/lib/presentation/pages/library_tab_container.dart

70 lines
2.1 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 {
2021-06-20 13:49:21 +02:00
const LibraryTabContainer({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: SafeArea(
child: Column(
children: <Widget>[
2021-01-17 10:20:51 +01:00
Padding(
2021-01-27 18:13:21 +01:00
padding: const EdgeInsets.only(top: 8.0, left: 4.0),
2021-01-17 10:20:51 +01:00
child: Row(
children: [
const Expanded(
child: TabBar(
indicatorSize: TabBarIndicatorSize.label,
2021-01-27 18:13:21 +01:00
indicatorWeight: 3.0,
2021-01-17 10:20:51 +01:00
labelStyle: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20.0,
),
2021-01-27 18:13:21 +01:00
labelPadding: EdgeInsets.symmetric(horizontal: 12.0),
2021-01-17 10:20:51 +01:00
unselectedLabelColor: Colors.white30,
isScrollable: true,
tabs: [
Tab(
text: 'Artists',
),
Tab(
text: 'Albums',
),
Tab(
text: 'Songs',
),
],
),
),
2021-06-20 17:07:12 +02:00
IconButton(icon: const Icon(Icons.more_vert), onPressed: () {}),
],
),
),
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'),
),
],
),
)
],
),
),
);
}
2021-01-17 10:20:51 +01:00
}