497 lines
23 KiB
Dart
497 lines
23 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:provider/provider.dart';
|
|
//import 'package:collection/collection.dart';
|
|
import 'dart:math';
|
|
|
|
import '../../app.dart';
|
|
import '../../common/constants.dart';
|
|
import '../../common/utils.dart';
|
|
import '../../data/repository/_dao.dart';
|
|
import '../../data/models/_models.dart';
|
|
import '../components/_components.dart';
|
|
|
|
class Discover_au68View extends StatefulWidget {
|
|
final Object? extra;
|
|
|
|
Discover_au68View({super.key, this.extra});
|
|
|
|
@override
|
|
State<Discover_au68View> createState() => _Discover_au68ViewState();
|
|
}
|
|
|
|
class _Discover_au68ViewState extends State<Discover_au68View> {
|
|
late Discover_au68Controller _view;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_view = Discover_au68Controller()..selectedIndex = widget.extra as int;
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ChangeNotifierProvider(
|
|
create: (context) => _view,
|
|
child: Consumer<Discover_au68Controller>(
|
|
builder: (context, view, child) => Scaffold(
|
|
backgroundColor: Color(0xff3a57e8),
|
|
appBar: AppBar(
|
|
elevation: 0,
|
|
centerTitle: true,
|
|
automaticallyImplyLeading: false,
|
|
backgroundColor: Color(0xff3a57e8),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.zero),
|
|
title: Text(
|
|
Constants.recentlyPlayed_,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w700,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 16,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
body: Padding(
|
|
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 0),
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.all(0),
|
|
padding: EdgeInsets.all(0),
|
|
width: MediaQuery.of(context).size.width,
|
|
height: 160,
|
|
decoration: BoxDecoration(
|
|
color: Color(0x00ffffff),
|
|
shape: BoxShape.rectangle,
|
|
borderRadius: BorderRadius.zero,
|
|
),
|
|
child: ListView(
|
|
scrollDirection: Axis.horizontal,
|
|
padding: EdgeInsets.all(0),
|
|
shrinkWrap: true,
|
|
physics: ClampingScrollPhysics(),
|
|
children: [
|
|
Padding1_p779(
|
|
Constants.newMusicHindi_,
|
|
'https://1.bp.blogspot.com/-Sfm1TVjYa8o/YEmNsLz6WNI/AAAAAAAADoE/WO7H_uaBtbkKXE0UiPeXn0P1gGSAGijJwCLcBGAsYHQ/s1280/maxresdefault%2B%25283%2529.jpg',
|
|
),
|
|
Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
///***If you have exported images you must have to copy those images in assets/images directory.
|
|
Image(
|
|
image: NetworkImage(
|
|
'https://i.scdn.co/image/ab67616d0000b27314621522f43a17b1f0cfb565',
|
|
),
|
|
height: 120,
|
|
width: 110,
|
|
fit: BoxFit.cover,
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(0, 8, 0, 0),
|
|
child: Text(
|
|
Constants.mTVCoke_,
|
|
textAlign: TextAlign.center,
|
|
maxLines: 1,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 12,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 0,
|
|
horizontal: 8,
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
///***If you have exported images you must have to copy those images in assets/images directory.
|
|
Image(
|
|
image: NetworkImage(
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRCD69ZCvQ8FdZG3VwTaIDVuQZ62tdd0zKujg&usqp=CAU',
|
|
),
|
|
height: 120,
|
|
width: 110,
|
|
fit: BoxFit.cover,
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(0, 8, 0, 0),
|
|
child: Text(
|
|
Constants.bollywoordButter_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 1,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 12,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(0, 0, 8, 0),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
///***If you have exported images you must have to copy those images in assets/images directory.
|
|
Image(
|
|
image: NetworkImage(
|
|
'https://i.scdn.co/image/ab67616d0000b27314621522f43a17b1f0cfb565',
|
|
),
|
|
height: 120,
|
|
width: 110,
|
|
fit: BoxFit.cover,
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(0, 8, 0, 0),
|
|
child: Text(
|
|
Constants.k90sRewind_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 1,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 12,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(16, 8, 16, 0),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Container(
|
|
height: 50,
|
|
width: 50,
|
|
clipBehavior: Clip.antiAlias,
|
|
decoration: BoxDecoration(shape: BoxShape.circle),
|
|
child: Image.network(
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcThsMMUK5ykC_JusWVz8opNfuNsYNwNMVLUDdFsGg2sW6gWyFL1mxCm818QkjpUZo_RlmI&usqp=CAU',
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(16, 0, 0, 0),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Text(
|
|
Constants.moreLike_,
|
|
textAlign: TextAlign.start,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 12,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(0, 4, 0, 0),
|
|
child: Text(
|
|
Constants.aRRahman_,
|
|
textAlign: TextAlign.start,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 16,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.fromLTRB(0, 16, 0, 0),
|
|
padding: EdgeInsets.all(0),
|
|
width: MediaQuery.of(context).size.width,
|
|
height: 180,
|
|
decoration: BoxDecoration(
|
|
color: Color(0x00ffffff),
|
|
shape: BoxShape.rectangle,
|
|
borderRadius: BorderRadius.zero,
|
|
),
|
|
child: ListView(
|
|
scrollDirection: Axis.horizontal,
|
|
padding: EdgeInsets.all(0),
|
|
shrinkWrap: true,
|
|
physics: ClampingScrollPhysics(),
|
|
children: [
|
|
Padding5_pcnl(
|
|
Constants.vishalShekharAtifAslam_,
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSejp88_U6iaR-vNPvZUdgj1omlqdK5M6apdBhq5g1jKCGOAbUYsg9yd3Hx6zG5SR3NcGc&usqp=CAU',
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 0,
|
|
horizontal: 8,
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
///***If you have exported images you must have to copy those images in assets/images directory.
|
|
Image(
|
|
image: NetworkImage(
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTDOjj0NZafV2BhUZOeJArqdFIM6Dn22Q6Uu2quiinylIONzg5yB7l1eDwzB9p44VtRhHM&usqp=CAU',
|
|
),
|
|
height: 140,
|
|
width: 140,
|
|
fit: BoxFit.cover,
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(8, 8, 0, 0),
|
|
child: Text(
|
|
Constants.sheryaGhoshval_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 2,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 11,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 0,
|
|
horizontal: 8,
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
///***If you have exported images you must have to copy those images in assets/images directory.
|
|
Image(
|
|
image: NetworkImage(
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSddOVWcVocDfTWl1Ent0iSpT099wKm7osDco50KMLoSFOLEpXNKB5TT1_V1KBvShC6on0&usqp=CAU',
|
|
),
|
|
height: 140,
|
|
width: 140,
|
|
fit: BoxFit.cover,
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(8, 8, 0, 0),
|
|
child: Text(
|
|
Constants.darshanRaval_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 2,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 14,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(16, 0, 0, 0),
|
|
child: Align(
|
|
alignment: Alignment.centerLeft,
|
|
child: Text12_uxqe(Constants.popularMusic_),
|
|
),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.fromLTRB(0, 16, 0, 0),
|
|
padding: EdgeInsets.all(0),
|
|
width: MediaQuery.of(context).size.width,
|
|
height: 220,
|
|
decoration: BoxDecoration(
|
|
color: Color(0x00000000),
|
|
shape: BoxShape.rectangle,
|
|
borderRadius: BorderRadius.zero,
|
|
),
|
|
child: ListView(
|
|
scrollDirection: Axis.horizontal,
|
|
padding: EdgeInsets.all(0),
|
|
shrinkWrap: true,
|
|
physics: ClampingScrollPhysics(),
|
|
children: [
|
|
Padding8_wdx9(
|
|
Constants.singleTanishkBagchi_,
|
|
Constants.raatanLmbiyan_,
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSejp88_U6iaR-vNPvZUdgj1omlqdK5M6apdBhq5g1jKCGOAbUYsg9yd3Hx6zG5SR3NcGc&usqp=CAU',
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(
|
|
vertical: 0,
|
|
horizontal: 8,
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
///***If you have exported images you must have to copy those images in assets/images directory.
|
|
Image(
|
|
image: NetworkImage(
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRCD69ZCvQ8FdZG3VwTaIDVuQZ62tdd0zKujg&usqp=CAU',
|
|
),
|
|
height: 160,
|
|
width: 140,
|
|
fit: BoxFit.cover,
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(8, 8, 0, 0),
|
|
child: Text(
|
|
Constants.ranjha_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 1,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w700,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 14,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(8, 4, 0, 0),
|
|
child: Text(
|
|
Constants.singleJasleenRoyal_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 1,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 12,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(0, 0, 8, 0),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
///***If you have exported images you must have to copy those images in assets/images directory.
|
|
Image(
|
|
image: NetworkImage(
|
|
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTDOjj0NZafV2BhUZOeJArqdFIM6Dn22Q6Uu2quiinylIONzg5yB7l1eDwzB9p44VtRhHM&usqp=CAU',
|
|
),
|
|
height: 160,
|
|
width: 140,
|
|
fit: BoxFit.cover,
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(8, 8, 0, 0),
|
|
child: Text(
|
|
Constants.shershaahOriginal_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 1,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w700,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 14,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.fromLTRB(8, 4, 0, 0),
|
|
child: Text(
|
|
Constants.ePVariousArtists_,
|
|
textAlign: TextAlign.start,
|
|
maxLines: 1,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontStyle: FontStyle.normal,
|
|
fontSize: 12,
|
|
color: Color(0xffffffff),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class Discover_au68Controller with ChangeNotifier {
|
|
int? selectedIndex;
|
|
|
|
dynamic getModel(Dao repository) {
|
|
final items = repository.getAll();
|
|
return (selectedIndex == null || selectedIndex! >= items.length)
|
|
? repository.create()
|
|
: items[selectedIndex!];
|
|
}
|
|
}
|