Created
March 28, 2020 19:05
-
-
Save anmolseth06/4ef1293e5c742d942a7bd37a703adc28 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