Skip to content

Instantly share code, notes, and snippets.

@josue1dario2
Created January 5, 2023 03:50
Show Gist options
  • Save josue1dario2/4038ed63c0ffda1d8df311afb1bcfab6 to your computer and use it in GitHub Desktop.
Save josue1dario2/4038ed63c0ffda1d8df311afb1bcfab6 to your computer and use it in GitHub Desktop.
1.Register Button
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