96 lines
3.5 KiB
Dart
96 lines
3.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class Highlight extends StatelessWidget {
|
|
const Highlight({Key key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 10.0,
|
|
horizontal: 12.0,
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(bottom: 6.0),
|
|
child: Text(
|
|
'Album of the Day',
|
|
style: Theme.of(context).textTheme.headline3,
|
|
),
|
|
),
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
children: [
|
|
Expanded(
|
|
flex: 1,
|
|
child: AspectRatio(
|
|
aspectRatio: 1,
|
|
child: Card(
|
|
elevation: 2.0,
|
|
clipBehavior: Clip.antiAlias,
|
|
margin: const EdgeInsets.all(0),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(6.0),
|
|
),
|
|
child: const Image(
|
|
image: AssetImage('assets/no_cover.png'),
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Expanded(
|
|
flex: 2,
|
|
child: AspectRatio(
|
|
aspectRatio: 2 / 1,
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(
|
|
left: 8.0, right: 8.0, top: 0.0, bottom: 1.0),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
mainAxisSize: MainAxisSize.max,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
'All Our Gods Have Abandoned Us',
|
|
style: Theme.of(context).textTheme.headline4,
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis
|
|
),
|
|
Text(
|
|
'Architects',
|
|
style: Theme.of(context).textTheme.headline5,
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
const Spacer(),
|
|
Container(
|
|
height: 36.0,
|
|
child: OutlineButton.icon(
|
|
onPressed: () {},
|
|
icon: const Icon(Icons.play_arrow),
|
|
label: const Text('PLAY'),
|
|
borderSide: BorderSide(
|
|
color: Theme.of(context).accentColor),
|
|
padding: const EdgeInsets.all(0),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(6.0),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|