Create LatestReport Page
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import 'package:ac_web/Widgets/LatestReportEntry.dart';
|
||||
import 'package:ac_web/Widgets/LatestReportHeader.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LatestReportColumn extends StatelessWidget{
|
||||
const LatestReportColumn({super.key});
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
List<Widget> widgets = <Widget>[];
|
||||
|
||||
widgets.add(LatestReportHeader(text: "Latest Reports", bigHeader: true,));
|
||||
|
||||
widgets.add(
|
||||
LatestReportHeader(text: "Today")
|
||||
);
|
||||
|
||||
widgets.add(LatestReportEntry(
|
||||
text: "Entry 0",
|
||||
icon: Icons.code,
|
||||
onTap: () => {widgets.add(
|
||||
LatestReportHeader(text: "WOOOD")
|
||||
)},
|
||||
));
|
||||
widgets.add(LatestReportEntry(
|
||||
text: "Entry 1",
|
||||
icon: Icons.newspaper,
|
||||
));
|
||||
|
||||
widgets.add(
|
||||
LatestReportHeader(text: "Yesterday")
|
||||
);
|
||||
widgets.add(LatestReportEntry(
|
||||
text: "Entry -1",
|
||||
icon: Icons.code,
|
||||
));
|
||||
|
||||
widgets.add(
|
||||
LatestReportHeader(text: "15. August")
|
||||
);
|
||||
|
||||
return ListView(
|
||||
padding: EdgeInsetsGeometry.all(8),
|
||||
children: widgets,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
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),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LatestReportHeader extends StatelessWidget{
|
||||
const LatestReportHeader({super.key, required this.text, this.bigHeader = false});
|
||||
|
||||
final String text;
|
||||
final bool bigHeader;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: bigHeader ? 32 : 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
decoration: bigHeader ? TextDecoration.underline : TextDecoration.none,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user