Skip to content

Instantly share code, notes, and snippets.

@AlenaNicolay
Created July 14, 2023 12:57
Show Gist options
  • Save AlenaNicolay/4fe7a9b45e8b61bf849360d00fc36f82 to your computer and use it in GitHub Desktop.
Save AlenaNicolay/4fe7a9b45e8b61bf849360d00fc36f82 to your computer and use it in GitHub Desktop.
CustomButton widget
class CustomButton extends StatelessWidget {
const CustomButton({
Key? key,
required this.title,
this.onPressed,
}) : super(key: key);
final String title;
final VoidCallback? onPressed;
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: onPressed,
child: Text(title),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment