Last active
March 26, 2020 12:28
-
-
Save evgkarasev/11d4d3b07c2bd1cb66e74f98db2ad1b9 to your computer and use it in GitHub Desktop.
Simple Material UI App with Flutter Widgets
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'; | |
void main() { | |
return runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
backgroundColor: Colors.teal, | |
body: SafeArea( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
crossAxisAlignment: CrossAxisAlignment.center, | |
children: <Widget>[ | |
CircleAvatar( | |
radius: 40, | |
backgroundImage: AssetImage('images/manmakarov.jpg'), | |
), | |
Text( | |
'Piter Norton', | |
style: TextStyle( | |
fontFamily: 'Pacifico', | |
fontSize: 25, | |
color: Colors.white, | |
), | |
), | |
Text( | |
'OUT OF THE BOX THINKER', | |
style: TextStyle( | |
fontFamily: 'SourceSansPro', | |
fontWeight: FontWeight.w200, | |
fontSize: 15, | |
letterSpacing: 2.5, | |
color: Colors.teal.shade50, | |
), | |
), | |
SizedBox( | |
height: 20, | |
width: 150, | |
child: Divider( | |
color: Colors.teal.shade100, | |
thickness: 1, | |
), | |
), | |
Card( | |
margin: EdgeInsets.symmetric(vertical: 5, horizontal: 20), | |
child: ListTile( | |
leading: Icon( | |
Icons.phone, | |
size: 25, | |
color: Colors.teal.shade700, | |
), | |
title: Text( | |
'+44 123 456 7890', | |
style: TextStyle( | |
fontFamily: 'SourceSansPro', | |
fontWeight: FontWeight.bold, | |
fontSize: 15, | |
color: Colors.teal.shade700, | |
), | |
), | |
), | |
), | |
Card( | |
margin: EdgeInsets.symmetric(vertical: 5, horizontal: 20), | |
child: ListTile( | |
leading: Icon( | |
Icons.email, | |
size: 25, | |
color: Colors.teal.shade700, | |
), | |
title: Text( | |
'[email protected]', | |
style: TextStyle( | |
fontFamily: 'SourceSansPro', | |
fontWeight: FontWeight.bold, | |
fontSize: 15, | |
color: Colors.teal.shade700, | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
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
name: business_card_app | |
description: Simple Flutter Material App | |
version: 1.0.0+1 | |
environment: | |
sdk: ">=2.7.0 <3.0.0" | |
dependencies: | |
flutter: | |
sdk: flutter | |
cupertino_icons: ^0.1.3 | |
dev_dependencies: | |
flutter_test: | |
sdk: flutter | |
# For information on the generic Dart part of this file, see the | |
# following page: https://dart.dev/tools/pub/pubspec | |
# The following section is specific to Flutter. | |
flutter: | |
# The following line ensures that the Material Icons font is | |
# included with your application, so that you can use the icons in | |
# the material Icons class. | |
uses-material-design: true | |
# To add assets to your application, add an assets section, like this: | |
assets: | |
- images/ | |
# An image asset can refer to one or more resolution-specific "variants", see | |
# https://flutter.dev/assets-and-images/#resolution-aware. | |
# For details regarding adding assets from package dependencies, see | |
# https://flutter.dev/assets-and-images/#from-packages | |
fonts: | |
- family: Pacifico | |
fonts: | |
- asset: fonts/Pacifico-Regular.ttf | |
- family: PoiretOne | |
fonts: | |
- asset: fonts/PoiretOne-Regular.ttf | |
- family: MajorMonoDisplay | |
fonts: | |
- asset: fonts/MajorMonoDisplay-Regular.ttf | |
- family: JuliusSansOne | |
fonts: | |
- asset: fonts/JuliusSansOne-Regular.ttf | |
- family: SourceSansPro | |
fonts: | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-ExtraLight.ttf | |
weight: 200 | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-Light.ttf | |
weight: 300 | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-LightItalic.ttf | |
style: italic | |
weight: 300 | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-Italic.ttf | |
style: italic | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf | |
weight: 600 | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-Bold.ttf | |
weight: 700 | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-Black.ttf | |
weight: 900 | |
- asset: fonts/Source_Sans_Pro/SourceSansPro-BlackItalic.ttf | |
style: italic | |
weight: 900 | |
# For details regarding fonts from package dependencies, | |
# see https://flutter.dev/custom-fonts/#from-packages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment