forked from eatvio/eatvio_app
feat(app): Added a popup menu to bottom navbar
This commit is contained in:
36
lib/widgets/custom_navigation_menu_item.dart
Normal file
36
lib/widgets/custom_navigation_menu_item.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:eatvio_app/widgets/custom_image_view.dart';
|
||||
|
||||
class MenuItem extends StatelessWidget {
|
||||
final String icon;
|
||||
final String text;
|
||||
final VoidCallback onTap;
|
||||
|
||||
const MenuItem({
|
||||
required this.icon,
|
||||
required this.text,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center, // Выравнивание по центру вертикально
|
||||
children: <Widget>[
|
||||
CustomImageView(imagePath: icon),
|
||||
SizedBox(
|
||||
width:
|
||||
8.0), // Добавляем небольшой отступ между иконкой и текстом
|
||||
Text(text),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user