|
| 1 | +import 'package:cached_network_image/cached_network_image.dart'; |
| 2 | +import 'package:flutter/material.dart'; |
| 3 | +import 'package:flutter_swiper/flutter_swiper.dart'; |
| 4 | +import 'package:flutter_ui_challenges/core/presentation/res/assets.dart'; |
| 5 | +import 'package:flutter_ui_challenges/src/pages/invitation/inlanding.dart'; |
| 6 | + |
| 7 | +class MusicPlayerTwoPage extends StatelessWidget { |
| 8 | + static final String path = "lib/src/pages/misc/musicplayer2.dart"; |
| 9 | + @override |
| 10 | + Widget build(BuildContext context) { |
| 11 | + return Scaffold( |
| 12 | + appBar: AppBar( |
| 13 | + backgroundColor: Colors.transparent, |
| 14 | + elevation: 0, |
| 15 | + iconTheme: IconThemeData(color: Colors.black), |
| 16 | + title: Text( |
| 17 | + 'Music Player', |
| 18 | + style: TextStyle(color: Colors.black), |
| 19 | + ), |
| 20 | + actions: <Widget>[ |
| 21 | + MaterialButton( |
| 22 | + padding: const EdgeInsets.all(0), |
| 23 | + elevation: 0, |
| 24 | + shape: CircleBorder(), |
| 25 | + onPressed: () {}, |
| 26 | + child: CircleAvatar( |
| 27 | + maxRadius: 15.0, |
| 28 | + backgroundImage: CachedNetworkImageProvider(avatars[0]), |
| 29 | + ), |
| 30 | + ), |
| 31 | + ], |
| 32 | + ), |
| 33 | + body: SingleChildScrollView( |
| 34 | + child: Column( |
| 35 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 36 | + children: <Widget>[ |
| 37 | + Container( |
| 38 | + height: 250, |
| 39 | + child: Swiper( |
| 40 | + viewportFraction: 0.8, |
| 41 | + scale: 0.9, |
| 42 | + itemCount: 3, |
| 43 | + itemBuilder: (context, index) => Stack( |
| 44 | + children: <Widget>[ |
| 45 | + Container( |
| 46 | + decoration: BoxDecoration( |
| 47 | + color: Colors.blue, |
| 48 | + borderRadius: BorderRadius.circular(10.0), |
| 49 | + image: DecorationImage( |
| 50 | + image: CachedNetworkImageProvider(images[index]), |
| 51 | + fit: BoxFit.cover, |
| 52 | + )), |
| 53 | + ), |
| 54 | + Container( |
| 55 | + alignment: Alignment.center, |
| 56 | + decoration: BoxDecoration( |
| 57 | + borderRadius: BorderRadius.circular(10.0), |
| 58 | + color: Colors.blue.withOpacity(0.5)), |
| 59 | + child: Text( |
| 60 | + "Travel Series", |
| 61 | + style: TextStyle( |
| 62 | + color: Colors.white, |
| 63 | + fontWeight: FontWeight.bold, |
| 64 | + fontSize: 24.0, |
| 65 | + ), |
| 66 | + ), |
| 67 | + ) |
| 68 | + ], |
| 69 | + ), |
| 70 | + ), |
| 71 | + ), |
| 72 | + const SizedBox(height: 10.0), |
| 73 | + Container( |
| 74 | + width: double.infinity, |
| 75 | + padding: const EdgeInsets.all(16.0), |
| 76 | + color: Colors.black, |
| 77 | + child: Text( |
| 78 | + "My Playlist, 348 Songs".toUpperCase(), |
| 79 | + style: whiteText, |
| 80 | + ), |
| 81 | + ), |
| 82 | + ListTile( |
| 83 | + leading: Icon(Icons.pause), |
| 84 | + title: Text("Ariana Grande"), |
| 85 | + subtitle: Column( |
| 86 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 87 | + children: <Widget>[ |
| 88 | + Text("Daydreaming"), |
| 89 | + const SizedBox(height: 10.0), |
| 90 | + ], |
| 91 | + ), |
| 92 | + trailing: Text("3:45"), |
| 93 | + ), |
| 94 | + Padding( |
| 95 | + padding: const EdgeInsets.only(left: 70.0,right: 20), |
| 96 | + child: Stack( |
| 97 | + children: <Widget>[ |
| 98 | + Container( |
| 99 | + width: double.infinity, |
| 100 | + height: 1.0, |
| 101 | + color: Colors.grey, |
| 102 | + ), |
| 103 | + Container( |
| 104 | + width: MediaQuery.of(context).size.width-300, |
| 105 | + height: 1.0, |
| 106 | + color: Colors.black, |
| 107 | + ), |
| 108 | + ], |
| 109 | + ), |
| 110 | + ), |
| 111 | + ListTile( |
| 112 | + leading: Icon(Icons.play_arrow), |
| 113 | + title: Text("Beyonce"), |
| 114 | + subtitle: Text("Halo"), |
| 115 | + trailing: Text("3:05"), |
| 116 | + ), |
| 117 | + ListTile( |
| 118 | + leading: Icon(Icons.play_arrow), |
| 119 | + title: Text("Don't let me down"), |
| 120 | + subtitle: Text("Coldplay"), |
| 121 | + trailing: Text("3:05"), |
| 122 | + ), |
| 123 | + ListTile( |
| 124 | + leading: Icon(Icons.play_arrow), |
| 125 | + title: Text("Just the way you are"), |
| 126 | + subtitle: Text("Bruno Mars"), |
| 127 | + trailing: Text("3:05"), |
| 128 | + ), |
| 129 | + ListTile( |
| 130 | + leading: Icon(Icons.play_arrow), |
| 131 | + title: Text("Beyonce"), |
| 132 | + subtitle: Text("Halo"), |
| 133 | + trailing: Text("3:05"), |
| 134 | + ), |
| 135 | + ListTile( |
| 136 | + leading: Icon(Icons.play_arrow), |
| 137 | + title: Text("Just the way you are"), |
| 138 | + subtitle: Text("Bruno Mars"), |
| 139 | + trailing: Text("3:05"), |
| 140 | + ), |
| 141 | + ], |
| 142 | + ), |
| 143 | + ), |
| 144 | + ); |
| 145 | + } |
| 146 | +} |
0 commit comments