Skip to content

Instantly share code, notes, and snippets.

@isacjunior
Last active September 25, 2020 02:13
Show Gist options
  • Save isacjunior/f0bd54958145f5705e20bb0f44159789 to your computer and use it in GitHub Desktop.
Save isacjunior/f0bd54958145f5705e20bb0f44159789 to your computer and use it in GitHub Desktop.
import 'package:flutter/cupertino.dart';
class Button extends StatelessWidget {
Button(
this.text, {
@required this.onPressed,
this.color = const Color(0xff007aff),
});
final String text;
final void Function() onPressed;
final Color color;
@override
Widget build(BuildContext context) {
return CupertinoButton(
color: color,
onPressed: onPressed,
child: Text(text),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment