35 lines
910 B
Dart
35 lines
910 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class LatestReportEntry extends StatelessWidget{
|
|
const LatestReportEntry({super.key, required this.text, required this.icon, this.onTap});
|
|
|
|
final String text;
|
|
final IconData icon;
|
|
final VoidCallback? onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
return Card(
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadiusGeometry.circular(12)),
|
|
shadowColor: Colors.white,
|
|
color: Colors.black38,
|
|
margin: EdgeInsetsGeometry.fromLTRB(0, 8, 0, 8),
|
|
child:
|
|
InkWell(
|
|
onTap: onTap,
|
|
borderRadius: BorderRadius.circular(12),
|
|
child: Container(
|
|
child: Row(
|
|
children: [
|
|
Icon(icon),
|
|
Text(text),
|
|
],
|
|
spacing: 8,
|
|
),
|
|
margin: EdgeInsetsGeometry.all(16),
|
|
),
|
|
)
|
|
);
|
|
}
|
|
} |