Skip to content

Instantly share code, notes, and snippets.

@fatihhcan
Created September 4, 2020 16:09
Show Gist options
  • Save fatihhcan/f93c39d6963b717bef4b3bc524ed33cc to your computer and use it in GitHub Desktop.
Save fatihhcan/f93c39d6963b717bef4b3bc524ed33cc to your computer and use it in GitHub Desktop.
class _HomeViewState extends State<HomeView> {
get pageHeight => MediaQuery.of(context).size.height;
get pageWidth => MediaQuery.of(context).size.width;
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
backgroundColor: oneColor,
body: Container(
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 93),
child: Center(
child: galaxyAppTitleText,
),
),
SizedBox(
height: pageHeight * 0.09,
),
HomeCard(),
SizedBox(
height: pageHeight * 0.09,
),
buildGezegenlerVeCikisButonlari()
],
),
),
),
);
}
Container buildGezegenlerVeCikisButonlari() {
return Container(
child: Column(
children: [
ButtonTheme(
minWidth: pageWidth * 0.6,
height: pageHeight * 0.09,
child: RaisedButton(
color: fifthColor,
onPressed: () {
Navigator.pushNamed(context, '/planets');
},
child: buttonGezegenlerText,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40),
side: BorderSide(color: fifthColor)),
),
),
SizedBox(
height: pageHeight * 0.03,
),
ButtonTheme(
minWidth: pageWidth * 0.6,
height: pageHeight * 0.09,
child: RaisedButton(
color: fourthColor,
onPressed: () {
SystemNavigator.pop();
},
child: buttonCikisText,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40),
side: BorderSide(color: fourthColor)),
),
)
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment