Created
October 29, 2020 08:12
-
-
Save imaNNeo/022db04fd31d7a48d1db81d1056a423a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
main() => runApp(MaterialApp(home: MyHomePage())); | |
final double itemWidth = 188.0; | |
final double itemHeight = 200.0; | |
class MyHomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Flutter 4 Fun'), | |
), | |
body: Center( | |
child: Container( | |
width: itemWidth, | |
height: itemHeight, | |
child: Stack( | |
fit: StackFit.expand, | |
children: [ | |
Image.network( | |
'https://img.techpowerup.org/201029/game1.png', | |
fit: BoxFit.fitHeight, | |
), | |
Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text( | |
'Road Fight', | |
style: TextStyle( | |
color: Colors.white, | |
fontWeight: FontWeight.bold, | |
fontSize: 18, | |
), | |
), | |
SizedBox(height: 4,), | |
Text( | |
'Shooting Cars', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 14, | |
), | |
), | |
], | |
), | |
) | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment