Skip to content

Instantly share code, notes, and snippets.

@anmolseth06
Created April 1, 2020 14:08
Show Gist options
  • Select an option

  • Save anmolseth06/2d2b17ae5d3822ac15f4424df969680d to your computer and use it in GitHub Desktop.

Select an option

Save anmolseth06/2d2b17ae5d3822ac15f4424df969680d 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