Skip to content

Instantly share code, notes, and snippets.

@felipecastrosales
Created February 1, 2023 23:32
Show Gist options
  • Save felipecastrosales/d73eb7a7aab555156cb0637fde40f534 to your computer and use it in GitHub Desktop.
Save felipecastrosales/d73eb7a7aab555156cb0637fde40f534 to your computer and use it in GitHub Desktop.
sec
import 'package:flutter/material.dart';
import 'package:menu/features/home/widgets/home_menu_button_section.dart';
class HomeMenuButtonSectionWidget extends StatelessWidget {
const HomeMenuButtonSectionWidget({
super.key,
required this.section,
required this.onPressed,
});
final HomeMenuButtonSection section;
final VoidCallback onPressed;
@override
Widget build(BuildContext context) {
return Container(
height: 60,
margin: const EdgeInsets.symmetric(horizontal: 24),
child: Material(
color: Theme.of(context).primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
clipBehavior: Clip.antiAlias,
child: InkWell(
onTap: onPressed,
child: Padding(
padding: const EdgeInsets.all(16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: const [
Text(
'Ver menu completo',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
Icon(Icons.arrow_forward, color: Colors.white),
],
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment