Created
February 14, 2021 05:05
-
-
Save siumhossain/0412732f888b8c6c0eb6ae4d2a6f76f3 to your computer and use it in GitHub Desktop.
flutter basic
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() => runApp(MaterialApp( | |
| home: NinjaCard(), | |
| )); | |
| class NinjaCard extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| backgroundColor: Colors.grey[900], | |
| appBar: AppBar( | |
| title: Text('Ninja ID Card'), | |
| centerTitle: true, | |
| backgroundColor: Colors.grey[850], | |
| elevation: 0.0, | |
| ), | |
| body: Padding( | |
| padding: const EdgeInsets.fromLTRB(30.0, 40.0, 30.0, 0), | |
| child: Column( | |
| crossAxisAlignment: CrossAxisAlignment.start, | |
| children: <Widget>[ | |
| Center( | |
| child: CircleAvatar( | |
| radius: 40.0, | |
| backgroundImage: AssetImage('assets/thumb.jpg'), | |
| ), | |
| ), | |
| Divider( | |
| color: Colors.grey[800], | |
| height: 60.0, | |
| ), | |
| Text( | |
| 'NAME', | |
| style: TextStyle( | |
| color: Colors.grey, | |
| letterSpacing: 2.0, | |
| ), | |
| ), | |
| SizedBox(height: 10.0), | |
| Text( | |
| 'Chun-Li', | |
| style: TextStyle( | |
| color: Colors.amberAccent[200], | |
| fontWeight: FontWeight.bold, | |
| fontSize: 28.0, | |
| letterSpacing: 2.0, | |
| ), | |
| ), | |
| SizedBox(height: 30.0), | |
| Text( | |
| 'HOMETOWN', | |
| style: TextStyle( | |
| color: Colors.grey, | |
| letterSpacing: 2.0, | |
| ), | |
| ), | |
| SizedBox(height: 10.0), | |
| Text( | |
| 'Beijing, China', | |
| style: TextStyle( | |
| color: Colors.amberAccent[200], | |
| fontWeight: FontWeight.bold, | |
| fontSize: 28.0, | |
| letterSpacing: 2.0, | |
| ), | |
| ), | |
| SizedBox(height: 30.0), | |
| Text( | |
| 'CURRENT NINJA LEVEL', | |
| style: TextStyle( | |
| color: Colors.grey, | |
| letterSpacing: 2.0, | |
| ), | |
| ), | |
| SizedBox(height: 10.0), | |
| Text( | |
| '8', | |
| style: TextStyle( | |
| color: Colors.amberAccent[200], | |
| fontWeight: FontWeight.bold, | |
| fontSize: 28.0, | |
| letterSpacing: 2.0, | |
| ), | |
| ), | |
| SizedBox(height: 30.0), | |
| Row( | |
| children: <Widget>[ | |
| Icon( | |
| Icons.email, | |
| color: Colors.grey[400], | |
| ), | |
| SizedBox(width: 10.0), | |
| Text( | |
| '[email protected]', | |
| style: TextStyle( | |
| color: Colors.grey[400], | |
| fontSize: 18.0, | |
| letterSpacing: 1.0, | |
| ), | |
| ) | |
| ], | |
| ), | |
| ], | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment