Skip to content

Instantly share code, notes, and snippets.

@josue1dario2
Created December 14, 2022 01:09
Show Gist options
  • Save josue1dario2/25567d3d61eafaf4110089bc08ea8335 to your computer and use it in GitHub Desktop.
Save josue1dario2/25567d3d61eafaf4110089bc08ea8335 to your computer and use it in GitHub Desktop.
Validator Button (Folder Component)
class ValidatorButton extends StatelessWidget {
const ValidatorButton({super.key, required this.navigator});
final Widget navigator;
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return MaterialButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => navigator),
);
},
minWidth: size.width * 0.02,
child: SizedBox(
height: size.height * 0.06,
width: size.width * 0.04,
child: const Icon(
Icons.navigate_next,
size: 45,
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment