Created
April 2, 2025 16:58
-
-
Save prakhart111/be7aee5b32362d0f9a16db5967e1a680 to your computer and use it in GitHub Desktop.
Snippet created via Remix API
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'; | |
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: 380, | |
padding: EdgeInsets.symmetric(vertical: 30, horizontal: 25), | |
decoration: BoxDecoration( | |
gradient: LinearGradient( | |
colors: [ | |
Colors.deepPurple[100]!, | |
Colors.deepPurple[200]! | |
], | |
begin: Alignment.topLeft, | |
end: Alignment.bottomRight, | |
), | |
borderRadius: BorderRadius.circular(20), | |
), | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
crossAxisAlignment: CrossAxisAlignment.center, | |
children: [ | |
Container( | |
decoration: BoxDecoration( | |
shape: BoxShape.circle, | |
border: Border.all( | |
color: Colors.white, | |
width: 4, | |
), | |
), | |
child: CircleAvatar( | |
radius: 70, | |
backgroundImage: NetworkImage( | |
'https://img-wrapper.vercel.app/image?url=https://placehold.co/150x150.png?text=Profile', | |
), | |
), | |
), | |
SizedBox(height: 20), | |
Text( | |
'Emily Rodriguez', | |
style: TextStyle( | |
fontSize: 26, | |
fontWeight: FontWeight.w700, | |
color: Colors.deepPurple[900], | |
), | |
), | |
SizedBox(height: 10), | |
Text( | |
'UX/UI Designer', | |
style: TextStyle( | |
fontSize: 18, | |
color: Colors.deepPurple[800], | |
fontStyle: FontStyle.italic, | |
), | |
), | |
SizedBox(height: 20), | |
Divider( | |
color: Colors.white.withOpacity(0.5), | |
thickness: 1.5, | |
), | |
SizedBox(height: 20), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
children: [ | |
_buildContactInfo( | |
icon: Icons.email_outlined, | |
text: '[email protected]', | |
), | |
_buildContactInfo( | |
icon: Icons.phone_outlined, | |
text: '+1 (987) 654-3210', | |
), | |
], | |
), | |
], | |
), | |
), | |
), | |
), | |
), | |
), | |
); | |
} | |
Widget _buildContactInfo({required IconData icon, required String text}) { | |
return Column( | |
children: [ | |
Icon( | |
icon, | |
color: Colors.deepPurple[900], | |
size: 30, | |
), | |
SizedBox(height: 8), | |
Text( | |
text, | |
style: TextStyle( | |
color: Colors.deepPurple[900], | |
fontSize: 14, | |
fontWeight: FontWeight.w500, | |
), | |
), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment