2023-01-26 02:15:00 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:unit2/theme-data.dart/colors.dart';
|
|
|
|
|
|
|
|
class MainMenu extends StatelessWidget {
|
|
|
|
final IconData icon;
|
|
|
|
final String title;
|
2023-02-03 03:34:09 +00:00
|
|
|
final Function() onTap;
|
2023-01-26 02:15:00 +00:00
|
|
|
const MainMenu({
|
|
|
|
required this.icon,
|
|
|
|
required this.title,
|
2023-02-03 03:34:09 +00:00
|
|
|
required this.onTap,
|
2023-01-26 02:15:00 +00:00
|
|
|
Key? key,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ListTile(
|
|
|
|
leading: Icon(
|
|
|
|
icon,
|
|
|
|
color: primary,
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
title,
|
2023-02-03 03:34:09 +00:00
|
|
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
2023-01-26 02:15:00 +00:00
|
|
|
),
|
|
|
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
2023-02-03 03:34:09 +00:00
|
|
|
onTap: onTap,
|
2023-01-26 02:15:00 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|