You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.5 KiB
Dart
76 lines
2.5 KiB
Dart
4 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class CardBottom extends StatelessWidget {
|
||
|
final backgroundImage;
|
||
|
final text;
|
||
|
final subtext;
|
||
|
|
||
|
const CardBottom(
|
||
|
{@required this.backgroundImage,
|
||
|
@required this.text,
|
||
|
@required this.subtext});
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return GestureDetector(
|
||
|
onTap: () {},
|
||
|
child: Container(
|
||
|
height: 110,
|
||
|
margin: EdgeInsets.all(4.0),
|
||
|
decoration: BoxDecoration(
|
||
|
boxShadow: [
|
||
|
BoxShadow(
|
||
|
color: Colors.grey[300],
|
||
|
blurRadius: 3.0,
|
||
|
spreadRadius: 0.0,
|
||
|
// offset: Offset(2.0), // shadow direction: bottom right
|
||
|
)
|
||
|
],
|
||
|
image: DecorationImage(
|
||
|
image: AssetImage(this.backgroundImage), fit: BoxFit.fill),
|
||
|
borderRadius: BorderRadius.circular(5)),
|
||
|
child: Column(
|
||
|
children: <Widget>[
|
||
|
Container(
|
||
|
margin: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 5.0),
|
||
|
child: null,
|
||
|
),
|
||
|
Container(
|
||
|
width: MediaQuery.of(context).size.width * 0.48,
|
||
|
padding: EdgeInsets.fromLTRB(12.0, 0.0, 0.0, 0.0),
|
||
|
child: Column(
|
||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
children: <Widget>[
|
||
|
Text(this.text,
|
||
|
textAlign: TextAlign.start,
|
||
|
overflow: TextOverflow.clip,
|
||
|
style: TextStyle(
|
||
|
color: Colors.white,
|
||
|
fontSize: 16.0,
|
||
|
fontWeight: FontWeight.bold)),
|
||
|
Container(
|
||
|
padding: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
|
||
|
child: Text(this.subtext,
|
||
|
textAlign: TextAlign.start,
|
||
|
overflow: TextOverflow.clip,
|
||
|
style: TextStyle(color: Colors.white, fontSize: 12.0)),
|
||
|
),
|
||
|
Container(
|
||
|
padding: EdgeInsets.fromLTRB(0.0, 25.0, 0.0, 0.0),
|
||
|
child: Text("View All",
|
||
|
overflow: TextOverflow.clip,
|
||
|
style: TextStyle(
|
||
|
color: Colors.white,
|
||
|
fontSize: 16.0,
|
||
|
fontWeight: FontWeight.bold)),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|