Skip to content

Commit

Permalink
put picture to the center
Browse files Browse the repository at this point in the history
  • Loading branch information
LidiaTre committed Jun 12, 2023
1 parent ae789ec commit 5e1741b
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions children_games/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,36 @@ class DetailPage extends StatelessWidget {
appBar: AppBar(
title: Text(game.title),
),
body: Column(
children: <Widget>[
Image.network(game.image),
Text(game.title),
Text(game.description),
],
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
height: 300,
child: Image.network(
game.image,
fit: BoxFit.cover,
),
),
const SizedBox(height: 20),
Text(
game.title,
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 10),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Text(
game.description,
style: const TextStyle(fontSize: 18),
textAlign: TextAlign.center,
),
),
],
),
),
);
}
Expand Down

0 comments on commit 5e1741b

Please sign in to comment.