Created
January 5, 2023 03:50
-
-
Save josue1dario2/4038ed63c0ffda1d8df311afb1bcfab6 to your computer and use it in GitHub Desktop.
1.Register Button
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
class ButtonRegister extends StatelessWidget { | |
const ButtonRegister({Key? key, required this.navigator, required this.text}) | |
: super(key: key); | |
final Widget navigator; | |
final String text; | |
@override | |
Widget build(BuildContext context) { | |
Size size = MediaQuery.of(context).size; | |
return MaterialButton( | |
elevation: 0, | |
onPressed: () { | |
Navigator.push( | |
context, | |
MaterialPageRoute(builder: (context) => navigator), | |
); | |
}, | |
child: Container( | |
decoration: BoxDecoration( | |
color: const Color(0xFFF6F1FB), | |
borderRadius: BorderRadius.circular(40.0), | |
), | |
height: size.height * 0.062, | |
width: size.width * 0.85, | |
child: Center( | |
child: CustomText( | |
text: text, | |
size: 12, | |
weight: FontWeight.w600, | |
color: const Color(0xFF9356D1))), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment