Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lbarqueira/a44e1cf91f337115d880bae2a41d916b to your computer and use it in GitHub Desktop.
Save lbarqueira/a44e1cf91f337115d880bae2a41d916b to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Putting it all together',
home: Scaffold(
body: MyWidget(),
),
),
);
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.amber,
border: Border.all(
color: Colors.black,
width: 8.0,
),
),
margin: EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.account_circle, size: 50),
),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Flutter McFlutter',
style: Theme.of(context).textTheme.headline5,
),
Text(
'Experienced App Developer',
)
],
),
],
),
SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
'123 Main Street',
),
Text(
'(415) 555-0198',
),
],
),
SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Icon(Icons.accessibility),
Icon(Icons.timer),
Icon(Icons.phone_android),
Icon(Icons.phone_iphone),
],
),
SizedBox(height: 8),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment