Skip to content

Instantly share code, notes, and snippets.

@josue1dario2
Created January 11, 2023 01:03
Show Gist options
  • Save josue1dario2/cb2dbc4fb6f4151f237beab74c69cb2c to your computer and use it in GitHub Desktop.
Save josue1dario2/cb2dbc4fb6f4151f237beab74c69cb2c to your computer and use it in GitHub Desktop.
Border Button
class BorderButton extends StatelessWidget {
const BorderButton({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: Colors.white,
borderRadius: BorderRadius.circular(40.0),
border: Border.all(color: const Color(0xFF482F74), width: 1.5),
),
height: size.height * 0.062,
width: size.width * 0.85,
child: Center(
child: CustomText(
text: text,
size: 14,
weight: FontWeight.w600,
color: const Color(0xFF482F74))),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment