diff --git a/assets/img/ic_rocket_launch.png b/assets/img/ic_rocket_launch.png new file mode 100644 index 0000000..4a47b32 Binary files /dev/null and b/assets/img/ic_rocket_launch.png differ diff --git a/lib/view/RocketView.dart b/lib/view/RocketView.dart index 17d97b6..ecb2d38 100644 --- a/lib/view/RocketView.dart +++ b/lib/view/RocketView.dart @@ -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( @@ -22,11 +25,33 @@ class RocketView extends StatelessWidget { child: Padding( padding: EdgeInsets.all(16.0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - 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: [ + Icon(Icons.flag, color: Colors.black, size: launchIconHeight), + Text(launch.launchCompany.countryCode, + + style: TextStyle(color: Colors.black, fontSize: launchTextSize)), + ]), + Row(children: [ + Image.asset("assets/img/ic_rocket_launch.png", width: launchIconHeight), + Text(launch.launchCompany.name, + style: TextStyle(color: Colors.black, fontSize: launchTextSize)), + ]), + Row(children: [ + Icon(Icons.alarm, color: Colors.black, size: launchIconHeight,), + Text(launch.date, style: TextStyle(color: Colors.black, fontSize: launchTextSize)), + ]), ], ), ),