Created
April 1, 2020 14:08
-
-
Save anmolseth06/2d2b17ae5d3822ac15f4424df969680d to your computer and use it in GitHub Desktop.
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'; | |
| class Profile extends StatelessWidget { | |
| String firstName; | |
| String lastName; | |
| String email; | |
| String phoneNo; | |
| Profile({ | |
| @required this.email, | |
| @required this.lastName, | |
| @required this.firstName, | |
| }); | |
| Widget build(BuildContext context) { | |
| return Card( | |
| color: Colors.orangeAccent, | |
| child: ListTile( | |
| leading: CircleAvatar( | |
| child: Text( | |
| "${firstName.substring(0, 1).toUpperCase()} ${lastName.substring(0, 1).toUpperCase()}"), | |
| ), | |
| title: Text( | |
| "${firstName} ${lastName}", | |
| ), | |
| subtitle: Text("$email"), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment