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.
32 lines
849 B
Dart
32 lines
849 B
Dart
4 years ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||
|
|
||
|
class TopCard extends StatelessWidget {
|
||
|
TopCard({@required this.image, @required this.isSVG});
|
||
|
|
||
|
final String image;
|
||
|
final bool isSVG;
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return GestureDetector(
|
||
|
onTap: () {},
|
||
|
child: Card(
|
||
|
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
|
||
|
color: Colors.white.withOpacity(0.3),
|
||
|
shape: RoundedRectangleBorder(
|
||
|
borderRadius: BorderRadius.circular(10),
|
||
|
),
|
||
|
child: Container(
|
||
|
height: 100.0,
|
||
|
padding: EdgeInsets.all(7.0),
|
||
|
width: MediaQuery.of(context).size.width * 0.45,
|
||
|
child: this.isSVG
|
||
|
? SvgPicture.asset(this.image)
|
||
|
: Image.asset(this.image),
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|