Skip to content

Instantly share code, notes, and snippets.

@anmolseth06
Created March 28, 2020 19:05
Show Gist options
  • Save anmolseth06/4ef1293e5c742d942a7bd37a703adc28 to your computer and use it in GitHub Desktop.
Save anmolseth06/4ef1293e5c742d942a7bd37a703adc28 to your computer and use it in GitHub Desktop.
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