Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Try running this on Flutter, it's simple and cool
- //Here is a website if you want to run it Online
- // https://dartpad.dartlang.org/
- import 'package:flutter/material.dart';
- void main() => runApp(MaterialApp(
- home: Home(),
- ));
- class Home extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.grey[900],
- appBar: AppBar(
- title: Text(
- 'Pi ID Card',
- ),
- centerTitle: true,
- backgroundColor: Colors.grey[850],
- elevation: 0.0, // to remove shadow of the appBar
- ),
- body: Padding(
- padding: EdgeInsets.fromLTRB(30.0, 40.0, 30.0, 0.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Center(
- child : CircleAvatar(
- backgroundImage : NetworkImage('https://image.flaticon.com/icons/png/512/2726/2726000.png'),
- radius : 40.0,
- backgroundColor : Colors.grey[900],
- ),
- ),
- Divider(
- height : 60.0,
- color : Colors.grey[800],
- ),
- Text(
- 'NAME',
- style: TextStyle(
- color: Colors.grey,
- letterSpacing: 2.0,
- ),
- ),
- //sizedbox => simple alternative for padding between 2 elements(words)
- SizedBox(height: 10.0),
- Text(
- 'Rajath Pai',
- style: TextStyle(
- color: Colors.amberAccent[200],
- letterSpacing: 2.0,
- fontSize: 20.0,
- fontWeight: FontWeight.bold,
- ),
- ),
- SizedBox(height: 30.0),
- Text(
- 'Current Level',
- style: TextStyle(
- color: Colors.grey,
- letterSpacing: 2.0,
- ),
- ),
- //sizedbox => simple alternative for padding between 2 elements(words)
- SizedBox(height: 10.0),
- Text(
- '8',
- style: TextStyle(
- color: Colors.amberAccent[200],
- letterSpacing: 2.0,
- fontSize: 20.0,
- fontWeight: FontWeight.bold,
- ),
- ),
- SizedBox(height: 30.0),
- Row(
- children : <Widget>[
- Icon(
- Icons.email,
- color : Colors.grey[400],
- ),
- SizedBox(width : 10.0),
- Text(
- 'pai@gmail.com',
- style : TextStyle(
- color : Colors.grey[400],
- fontSize : 18.0,
- letterSpacing : 1.0,
- ),
- ),
- ],
- ),
- ],
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement