-
-
Save fatihhcan/dc8fd0e5f286c93a71e69ed59f3fedd0 to your computer and use it in GitHub Desktop.
This file contains 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 PlanetsView extends StatefulWidget { | |
PlanetsView({Key key}) : super(key: key); | |
@override | |
_PlanetsViewState createState() => _PlanetsViewState(); | |
} | |
class _PlanetsViewState extends State<PlanetsView> { | |
@override | |
Widget build(BuildContext context) { | |
return SafeArea( | |
child: Scaffold( | |
appBar: buildAppBar(), | |
backgroundColor: secondColor, | |
body: buildCardList()), | |
); | |
} | |
Container buildCardList() { | |
return Container( | |
child: Column( | |
children: [ | |
Expanded( | |
child: PlanetsCard(), | |
) | |
], | |
)); | |
} | |
AppBar buildAppBar() { | |
return AppBar(backgroundColor: thirdColor, leading: buildBackButton()); | |
} | |
IconButton buildBackButton() { | |
return IconButton( | |
icon: Icon( | |
Icons.arrow_back, | |
color: sixthColor, | |
), | |
onPressed: () { | |
Navigator.pushNamed(context, '/home'); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment