Skip to content

Instantly share code, notes, and snippets.

@aindong
Created July 16, 2019 09:06
Show Gist options
  • Save aindong/8ef93106d8f8b8b7639d4ec229b79f95 to your computer and use it in GitHub Desktop.
Save aindong/8ef93106d8f8b8b7639d4ec229b79f95 to your computer and use it in GitHub Desktop.
MiCard Flutter Practice
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.deepPurple,
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment(1.5, 1.3),
colors: [
Colors.deepPurple.shade700,
Colors.deepPurple.shade600,
Colors.deepPurple.shade400,
Colors.deepPurple.shade100
],
),
),
child: SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Card(
elevation: 20,
shape: CircleBorder(
side: BorderSide(
color: Colors.deepPurple.shade300,
width: 5,
),
),
child: CircleAvatar(
radius: 70,
backgroundColor: Colors.white,
backgroundImage: AssetImage('images/my-photo.png'),
),
),
Text(
'Alleo Indong',
style: TextStyle(
fontSize: 40,
color: Colors.white,
fontWeight: FontWeight.bold,
fontFamily: 'Pacifico',
),
),
SizedBox(
height: 20,
width: 150,
child: Divider(
color: Colors.deepPurple.shade200,
),
),
Text(
'Senior Lead Software Engineer'.toUpperCase(),
style: TextStyle(
color: Colors.deepPurple.shade100,
fontFamily: 'SourceSansPro',
fontSize: 18,
letterSpacing: 2.5,
fontWeight: FontWeight.bold,
),
),
Card(
elevation: 10,
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 25),
child: ListTile(
leading: Icon(
Icons.phone,
color: Colors.deepPurple,
),
title: Text(
'+63 917 xxx xxxx',
style: TextStyle(
color: Colors.deepPurple.shade900,
fontFamily: 'SourceSansPro',
fontSize: 20,
),
),
),
),
Card(
elevation: 10,
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 25),
child: ListTile(
leading: Icon(
Icons.email,
color: Colors.deepPurple,
),
title: Text(
'[email protected]',
style: TextStyle(
color: Colors.deepPurple.shade900,
fontFamily: 'SourceSansPro',
fontSize: 20,
),
),
),
),
],
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment