Last active
June 6, 2020 00:46
-
-
Save lesliearkorful/90c1e6a45a4be64a7b151c47b9f2e092 to your computer and use it in GitHub Desktop.
This file contains 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( | |
debugShowCheckedModeBanner: false, | |
home: Profile(), | |
); | |
} | |
} | |
class Profile extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: SingleChildScrollView( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
SizedBox( | |
height: 350, | |
child: Stack( | |
children: [ | |
Container( | |
height: 280, | |
decoration: BoxDecoration( | |
image: DecorationImage( | |
fit: BoxFit.cover, | |
image: NetworkImage( | |
"https://pbs.twimg.com/media/EZrqpacVAAAfzEE?format=jpg&name=medium", | |
), | |
), | |
), | |
), | |
Positioned( | |
bottom: 0, | |
left: 20, | |
child: Container( | |
padding: EdgeInsets.all(5), | |
decoration: BoxDecoration( | |
color: Colors.white, | |
shape: BoxShape.circle, | |
), | |
child: CircleAvatar( | |
radius: 60, | |
backgroundImage: NetworkImage( | |
"https://pbs.twimg.com/profile_images/1082744382585856001/rH_k3PtQ_400x400.jpg", | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
Padding( | |
padding: EdgeInsets.all(20), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text( | |
"SpaceX", | |
style: TextStyle( | |
fontSize: 22, | |
fontWeight: FontWeight.bold, | |
), | |
), | |
SizedBox(height: 5), | |
Text( | |
"@SpaceX", | |
style: TextStyle(fontSize: 16, color: Colors.grey), | |
), | |
SizedBox(height: 12), | |
Text( | |
"SpaceX designs, manufactures and launches the world’s most advanced rockets and spacecraft", | |
style: TextStyle(fontSize: 14), | |
), | |
], | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment