Last active
October 29, 2020 07:57
-
-
Save imaNNeo/d4652c75fa7ff998c30f02112e861f30 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())); | |
class MyHomePage extends StatelessWidget { | |
final double itemWidth = 188.0; | |
final double itemHeight = 200.0; | |
@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