Skip to content

Commit

Permalink
Add more details in rocket list
Browse files Browse the repository at this point in the history
Co-authored-by: Simone Sestito <[email protected]>
  • Loading branch information
m-i-n-a-r and Simone Sestito committed Oct 21, 2018
1 parent a7b63d1 commit 8747b2a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
Binary file added assets/img/ic_rocket_launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 29 additions & 4 deletions lib/view/RocketView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class RocketView extends StatelessWidget {

@override
Widget build(BuildContext context) {
final launchIconHeight = 28.0;
final launchTextSize = 17.0;

return Theme(
data: Theme.of(context).copyWith(
textTheme: TextTheme(
Expand All @@ -22,11 +25,33 @@ class RocketView extends StatelessWidget {
child: Padding(
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(launch.name, style: TextStyle(fontWeight: FontWeight.bold)),
Text(launch.launchCompany.toString()),
Text(launch.date),
Padding(
padding: EdgeInsets.only(bottom: 8.0),
child: Text(
launch.name,
style: Theme.of(context).textTheme.title.copyWith(
color: Colors.black,
),
textAlign: TextAlign.center,
),
),
Row(children: <Widget>[
Icon(Icons.flag, color: Colors.black, size: launchIconHeight),
Text(launch.launchCompany.countryCode,

style: TextStyle(color: Colors.black, fontSize: launchTextSize)),
]),
Row(children: <Widget>[
Image.asset("assets/img/ic_rocket_launch.png", width: launchIconHeight),
Text(launch.launchCompany.name,
style: TextStyle(color: Colors.black, fontSize: launchTextSize)),
]),
Row(children: <Widget>[
Icon(Icons.alarm, color: Colors.black, size: launchIconHeight,),
Text(launch.date, style: TextStyle(color: Colors.black, fontSize: launchTextSize)),
]),
],
),
),
Expand Down

0 comments on commit 8747b2a

Please sign in to comment.