Advertisement
rajath_pai

ninja15 ID project

Jul 30th, 2021
1,112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.96 KB | None | 0 0
  1. // Try running this on Flutter, it's simple and cool
  2. //Here is a website if you want to run it Online
  3. // https://dartpad.dartlang.org/
  4.  
  5. import 'package:flutter/material.dart';
  6.  
  7. void main() => runApp(MaterialApp(
  8.       home: Home(),
  9.     ));
  10.  
  11. class Home extends StatelessWidget {
  12.   @override
  13.   Widget build(BuildContext context) {
  14.     return Scaffold(
  15.       backgroundColor: Colors.grey[900],
  16.       appBar: AppBar(
  17.         title: Text(
  18.           'Pi ID Card',
  19.         ),
  20.         centerTitle: true,
  21.         backgroundColor: Colors.grey[850],
  22.         elevation: 0.0, // to remove shadow of the appBar
  23.       ),
  24.       body: Padding(
  25.         padding: EdgeInsets.fromLTRB(30.0, 40.0, 30.0, 0.0),
  26.         child: Column(
  27.           crossAxisAlignment: CrossAxisAlignment.start,
  28.           children: <Widget>[
  29.             Center(
  30.               child : CircleAvatar(
  31.                 backgroundImage : NetworkImage('https://image.flaticon.com/icons/png/512/2726/2726000.png'),
  32.                 radius : 40.0,
  33.                 backgroundColor : Colors.grey[900],
  34.               ),
  35.             ),
  36.             Divider(
  37.               height : 60.0,
  38.               color : Colors.grey[800],
  39.             ),
  40.             Text(
  41.               'NAME',
  42.               style: TextStyle(
  43.                 color: Colors.grey,
  44.                 letterSpacing: 2.0,
  45.               ),
  46.             ),
  47.             //sizedbox => simple alternative for padding between 2 elements(words)
  48.             SizedBox(height: 10.0),
  49.             Text(
  50.               'Rajath Pai',
  51.               style: TextStyle(
  52.                 color: Colors.amberAccent[200],
  53.                 letterSpacing: 2.0,
  54.                 fontSize: 20.0,
  55.                 fontWeight: FontWeight.bold,
  56.               ),
  57.             ),
  58.             SizedBox(height: 30.0),
  59.             Text(
  60.               'Current Level',
  61.               style: TextStyle(
  62.                 color: Colors.grey,
  63.                 letterSpacing: 2.0,
  64.               ),
  65.             ),
  66.             //sizedbox => simple alternative for padding between 2 elements(words)
  67.             SizedBox(height: 10.0),
  68.             Text(
  69.               '8',
  70.               style: TextStyle(
  71.                 color: Colors.amberAccent[200],
  72.                 letterSpacing: 2.0,
  73.                 fontSize: 20.0,
  74.                 fontWeight: FontWeight.bold,
  75.               ),
  76.             ),
  77.             SizedBox(height: 30.0),
  78.             Row(
  79.               children : <Widget>[
  80.                 Icon(
  81.                   Icons.email,
  82.                   color : Colors.grey[400],
  83.                 ),
  84.                 SizedBox(width : 10.0),
  85.                 Text(
  86.                   'pai@gmail.com',
  87.                   style : TextStyle(
  88.                     color : Colors.grey[400],
  89.                     fontSize : 18.0,
  90.                     letterSpacing : 1.0,
  91.                   ),
  92.                 ),
  93.               ],
  94.             ),
  95.           ],
  96.         ),
  97.       ),
  98.     );
  99.   }
  100. }
  101.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement