Created
May 10, 2023 04:53
-
-
Save choiks14/75676ca2bf87cf291ca0b56c7fe1d8bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Container( | |
color: Colors.transparent, | |
height: 200, | |
width: 200, | |
child: GridView.count( | |
primary: false, | |
padding: const EdgeInsets.all(0), | |
crossAxisSpacing: 8, | |
mainAxisSpacing: 8, | |
crossAxisCount: 2, | |
children: [ | |
ElevatedButton( | |
onPressed: isEnabled == false ? null : () { | |
onMenuClick(MenuType.up); | |
}, | |
style: ElevatedButton.styleFrom( | |
backgroundColor: Colors.white, | |
disabledBackgroundColor: disabledColor, | |
foregroundColor: activeColor, | |
elevation: 2 | |
), | |
child: Align( | |
child: Transform.rotate( | |
angle: (math.pi / 180) * 315, | |
child: SvgUtil(isEnabled ? 'ic_arrow_active' : 'ic_arrow').image() | |
) | |
) | |
), | |
ElevatedButton( | |
onPressed: isEnabled == false ? null : () { | |
onMenuClick(MenuType.right); | |
}, | |
style: ElevatedButton.styleFrom( | |
backgroundColor: Colors.white, | |
disabledBackgroundColor: disabledColor, | |
foregroundColor: activeColor, | |
elevation: 2 | |
), | |
child: Align( | |
child: Transform.rotate( | |
angle: (math.pi / 180) * 45, | |
child: SvgUtil(isEnabled ? 'ic_arrow_active' : 'ic_arrow').image() | |
) | |
) | |
), | |
ElevatedButton( | |
onPressed: isEnabled == false ? null : () { | |
onMenuClick(MenuType.down); | |
}, | |
style: ElevatedButton.styleFrom( | |
backgroundColor: Colors.white, | |
disabledBackgroundColor: disabledColor, | |
foregroundColor: activeColor, | |
elevation: 2 | |
), | |
child: Align( | |
child: Transform.rotate( | |
angle: (math.pi / 180) * 225, | |
child: SvgUtil(isEnabled ? 'ic_arrow_active' : 'ic_arrow').image() | |
) | |
) | |
), | |
ElevatedButton( | |
onPressed: isEnabled == false ? null : () { | |
onMenuClick(MenuType.left); | |
}, | |
style: ElevatedButton.styleFrom( | |
backgroundColor: Colors.white, | |
disabledBackgroundColor: disabledColor, | |
foregroundColor: activeColor, | |
elevation: 2 | |
), | |
child: Align( | |
child: Transform.rotate( | |
angle: (math.pi / 180) * 135, | |
child: SvgUtil(isEnabled ? 'ic_arrow_active' : 'ic_arrow').image() | |
) | |
) | |
) | |
] | |
) | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment