Skip to content

Instantly share code, notes, and snippets.

@prakhart111
Created April 2, 2025 17:05
Show Gist options
  • Save prakhart111/cd934b2d71432a5a88f415e946e41094 to your computer and use it in GitHub Desktop.
Save prakhart111/cd934b2d71432a5a88f415e946e41094 to your computer and use it in GitHub Desktop.
Snippet created via Remix API
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.deepPurple[50],
body: SafeArea(
child: Center(
child: Card(
elevation: 10,
shadowColor: Colors.deepPurple[200],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
margin: EdgeInsets.all(20),
child: Container(
width: 350,
padding: EdgeInsets.all(25),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Colors.deepPurple[100]!,
width: 4,
),
),
child: CircleAvatar(
radius: 70,
backgroundColor: Colors.deepPurple[50],
backgroundImage: NetworkImage(
'https://img-wrapper.vercel.app/image?url=https://placehold.co/140x140.png?text=Profile',
),
),
),
SizedBox(height: 20),
Text(
'Sarah Johnson',
style: TextStyle(
fontSize: 26,
fontWeight: FontWeight.w600,
color: Colors.deepPurple[900],
),
),
SizedBox(height: 8),
Text(
'UX/UI Designer',
style: TextStyle(
fontSize: 18,
color: Colors.deepPurple[700],
),
),
SizedBox(height: 20),
Divider(
color: Colors.deepPurple[200],
thickness: 1.5,
),
SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_buildContactIcon(Icons.email, 'Email'),
_buildContactIcon(Icons.phone, 'Call'),
_buildContactIcon(Icons.message, 'Message'),
],
)
],
),
),
),
),
),
),
);
}
Widget _buildContactIcon(IconData icon, String label) {
return Column(
children: [
Container(
decoration: BoxDecoration(
color: Colors.deepPurple[100],
shape: BoxShape.circle,
),
padding: EdgeInsets.all(12),
child: Icon(
icon,
color: Colors.deepPurple[800],
size: 28,
),
),
SizedBox(height: 8),
Text(
label,
style: TextStyle(
color: Colors.deepPurple[700],
fontSize: 14,
),
)
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment