Skip to content

Instantly share code, notes, and snippets.

@imaNNeo
Created October 29, 2020 08:12
Show Gist options
  • Save imaNNeo/022db04fd31d7a48d1db81d1056a423a to your computer and use it in GitHub Desktop.
Save imaNNeo/022db04fd31d7a48d1db81d1056a423a to your computer and use it in GitHub Desktop.
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