Skip to content

Instantly share code, notes, and snippets.

@shahjugal
Created May 1, 2023 04:06
Show Gist options
  • Save shahjugal/81bc2c0a3bbd08f194e667d5dbbdda20 to your computer and use it in GitHub Desktop.
Save shahjugal/81bc2c0a3bbd08f194e667d5dbbdda20 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'ColorData.dart';
class AccountMenuItemWidget extends StatelessWidget {
final IconData icon;
final String label;
final VoidCallback? onTap;
AccountMenuItemWidget({
required this.icon,
required this.label,
this.onTap,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
decoration: BoxDecoration(
color: ColorPallet().cardBGColor,
border: Border.all(color: ColorPallet().cardBorderColor, width: 0.4)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 15,
),
Expanded(
child: Icon(
icon,
size: (MediaQuery.of(context).size.height)/50+10,
color: ColorPallet().textColor,
),
),
SizedBox(
width: 30,
),
Expanded(
flex: 35,
child: Text(
label,
style: TextStyle(
fontSize: (MediaQuery.of(context).size.height)/50,
fontFamily: 'RobotoMono',
color: ColorPallet().textColor,
fontWeight: FontWeight.bold
),
),
),
Expanded(
child: Icon(
Icons.navigate_next,
size: (MediaQuery.of(context).size.height)/50+10,
color: ColorPallet().subtitleTextColor,
),
),
SizedBox(
width: 30,
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment