2020-04-11 23:14:20 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'albums_page.dart';
|
2020-08-08 19:02:03 +02:00
|
|
|
import 'artists_page.dart';
|
2020-04-11 23:14:20 +02:00
|
|
|
import 'songs_page.dart';
|
|
|
|
|
|
|
|
class LibraryTabContainer extends StatelessWidget {
|
2021-06-20 13:49:21 +02:00
|
|
|
const LibraryTabContainer({Key? key}) : super(key: key);
|
2020-04-11 23:14:20 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return DefaultTabController(
|
|
|
|
length: 3,
|
|
|
|
child: SafeArea(
|
|
|
|
child: Column(
|
2020-04-16 08:04:34 +02:00
|
|
|
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',
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2020-04-16 08:04:34 +02:00
|
|
|
),
|
2021-06-20 17:07:12 +02:00
|
|
|
IconButton(icon: const Icon(Icons.more_vert), onPressed: () {}),
|
2020-04-16 08:04:34 +02:00
|
|
|
],
|
|
|
|
),
|
2020-04-11 23:14:20 +02:00
|
|
|
),
|
2020-05-09 19:46:06 +02:00
|
|
|
const Expanded(
|
2020-04-11 23:14:20 +02:00
|
|
|
child: TabBarView(
|
|
|
|
children: <Widget>[
|
2020-08-08 19:02:03 +02:00
|
|
|
ArtistsPage(
|
|
|
|
key: PageStorageKey('ArtistsPage'),
|
2020-04-11 23:14:20 +02:00
|
|
|
),
|
|
|
|
AlbumsPage(
|
|
|
|
key: PageStorageKey('AlbumsPage'),
|
|
|
|
),
|
|
|
|
SongsPage(
|
|
|
|
key: PageStorageKey('SongsPage'),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2021-01-17 10:20:51 +01:00
|
|
|
}
|