Created
April 3, 2020 17:40
-
-
Save vijayinyoutube/88b3b9edb3e33d0be0b6f40427a60af0 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: MyPage(), | |
); | |
} | |
} | |
class MyPage extends StatefulWidget { | |
@override | |
_MyPageState createState() => _MyPageState(); | |
} | |
class _MyPageState extends State<MyPage> { | |
@override | |
Widget build(BuildContext context) { | |
return new DefaultTabController( | |
length: 3, | |
child: new Scaffold( | |
appBar: new AppBar( | |
centerTitle: false, | |
title: new Text( | |
"Vijay creations", | |
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold), | |
), | |
actions: <Widget>[ | |
IconButton( | |
icon: Icon(Icons.settings, color: Colors.white), | |
onPressed: () {}), | |
], | |
flexibleSpace: Container( | |
decoration: BoxDecoration( | |
boxShadow: [new BoxShadow(blurRadius: 15.0)], | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment.bottomRight, | |
colors: <Color>[Color(0xFFFF1000), Color(0xFF2508FF)])), | |
), | |
bottom: new PreferredSize( | |
preferredSize: new Size(75.0, 75.0), | |
child: new Container( | |
width: 350.0, | |
child: new TabBar(tabs: [ | |
new Container( | |
height: 55.0, | |
child: new Tab( | |
text: "People", | |
), | |
), | |
new Container( | |
height: 55.0, | |
child: new Tab( | |
text: "Market", | |
), | |
), | |
new Container( | |
height: 55.0, | |
child: new Tab( | |
text: "Exports", | |
), | |
), | |
])), | |
), | |
), | |
body: SingleChildScrollView( | |
child: Container( | |
child: Column( | |
children: <Widget>[ | |
SizedBox(height: 10), | |
buildcard(), | |
], | |
)), | |
), | |
), | |
); | |
} | |
Widget buildcard() { | |
return Column( | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.only(left: 2, right: 2), | |
child: Stack( | |
children: <Widget>[ | |
Container( | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(25), | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment( | |
0.8, 0.0), // 10% of the width, so there are ten blinds. | |
colors: [ | |
Color(0xF25FFFFF), | |
Color(0xFF2508FF), | |
Color(0xFF2508FF), | |
], // whitish to gray | |
tileMode: TileMode | |
.repeated, // repeats the gradient over the canvas | |
), | |
), | |
child: Stack( | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.all(10), | |
child: Card( | |
elevation: 0, | |
color: Colors.transparent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.only(left: 55), | |
child: const ListTile( | |
trailing: Icon( | |
Icons.navigate_next, | |
color: Colors.white, | |
size: 30, | |
), | |
title: Text( | |
'Richard Price', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 20, | |
fontWeight: FontWeight.bold), | |
), | |
subtitle: Text( | |
'Florida, USA', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 12, | |
fontWeight: FontWeight.bold), | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
Padding( | |
padding: EdgeInsets.only(left: 5, top: 12), | |
child: Align( | |
alignment: Alignment.topLeft, | |
child: ClipOval( | |
child: Container( | |
child: new Image.asset( | |
"assets/image-1.png", | |
fit: BoxFit.fill, | |
width: 75, | |
height: 75, | |
), | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
SizedBox(height: 10), | |
Padding( | |
padding: EdgeInsets.only(left: 2, right: 2), | |
child: Stack( | |
children: <Widget>[ | |
Container( | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(25), | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment( | |
0.8, 0.0), // 10% of the width, so there are ten blinds. | |
colors: [ | |
Color(0xFFEC407A), | |
Color(0xFFFFC107), | |
], // whitish to gray | |
tileMode: TileMode | |
.repeated, // repeats the gradient over the canvas | |
), | |
), | |
child: Stack( | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.all(10), | |
child: Card( | |
elevation: 0, | |
color: Colors.transparent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.only(left: 55), | |
child: const ListTile( | |
trailing: Icon( | |
Icons.navigate_next, | |
color: Colors.white, | |
size: 30, | |
), | |
title: Text( | |
'Bell Hood', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 20, | |
fontWeight: FontWeight.bold), | |
), | |
subtitle: Text( | |
'Mumbai, India', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 12, | |
fontWeight: FontWeight.bold), | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
Padding( | |
padding: EdgeInsets.only(left: 5, top: 12), | |
child: Align( | |
alignment: Alignment.topLeft, | |
child: ClipOval( | |
child: Container( | |
child: new Image.asset( | |
"assets/image-1.jpeg", | |
fit: BoxFit.fill, | |
width: 75, | |
height: 75, | |
), | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
SizedBox(height: 10), | |
Padding( | |
padding: EdgeInsets.only(left: 2, right: 2), | |
child: Stack( | |
children: <Widget>[ | |
Container( | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(25), | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment( | |
0.8, 0.0), // 10% of the width, so there are ten blinds. | |
colors: [ | |
Color(0xFF76FF03), | |
Color(0xFF9C27B0), | |
Color(0xFF4A148C), | |
], // whitish to gray | |
tileMode: TileMode | |
.repeated, // repeats the gradient over the canvas | |
), | |
), | |
child: Stack( | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.all(10), | |
child: Card( | |
elevation: 0, | |
color: Colors.transparent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.only(left: 55), | |
child: const ListTile( | |
trailing: Icon( | |
Icons.navigate_next, | |
color: Colors.white, | |
size: 30, | |
), | |
title: Text( | |
'Hendry Rose', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 20, | |
fontWeight: FontWeight.bold), | |
), | |
subtitle: Text( | |
'Sydney, Australia', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 12, | |
fontWeight: FontWeight.bold), | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
Padding( | |
padding: EdgeInsets.only( | |
left: 5, | |
top: 12, | |
), | |
child: Align( | |
alignment: Alignment.topLeft, | |
child: ClipOval( | |
child: Container( | |
child: new Image.asset( | |
"assets/image-1.png", | |
fit: BoxFit.fill, | |
width: 75, | |
height: 75, | |
), | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
SizedBox(height: 10), | |
Padding( | |
padding: EdgeInsets.only(left: 2, right: 2), | |
child: Stack( | |
children: <Widget>[ | |
Container( | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(25), | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment( | |
0.8, 0.0), // 10% of the width, so there are ten blinds. | |
colors: [ | |
Color(0xFFFFAB00), | |
Color(0xFFFF1744), | |
Color(0xFFFF1744), | |
], // whitish to gray | |
tileMode: TileMode | |
.repeated, // repeats the gradient over the canvas | |
), | |
), | |
child: Stack( | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.all(10), | |
child: Card( | |
elevation: 0, | |
color: Colors.transparent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.only(left: 55), | |
child: const ListTile( | |
trailing: Icon( | |
Icons.navigate_next, | |
color: Colors.white, | |
size: 30, | |
), | |
title: Text( | |
'Pink Pa', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 20, | |
fontWeight: FontWeight.bold), | |
), | |
subtitle: Text( | |
'Tokyo, Japan', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 12, | |
fontWeight: FontWeight.bold), | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
Padding( | |
padding: EdgeInsets.only( | |
left: 5, | |
top: 12, | |
), | |
child: Align( | |
alignment: Alignment.topLeft, | |
child: ClipOval( | |
child: Container( | |
child: new Image.asset( | |
"assets/image-1.png", | |
fit: BoxFit.fill, | |
width: 75, | |
height: 75, | |
), | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
SizedBox(height: 10), | |
Padding( | |
padding: EdgeInsets.only(left: 2, right: 2), | |
child: Stack( | |
children: <Widget>[ | |
Container( | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(25), | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment( | |
0.8, 0.0), // 10% of the width, so there are ten blinds. | |
colors: [ | |
Color(0xFFFF9800), | |
Color(0xFF9C2700), | |
], // whitish to gray | |
tileMode: TileMode | |
.repeated, // repeats the gradient over the canvas | |
), | |
), | |
child: Stack( | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.all(10), | |
child: Card( | |
elevation: 0, | |
color: Colors.transparent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
Padding( | |
padding: EdgeInsets.only(left: 55), | |
child: const ListTile( | |
trailing: Icon( | |
Icons.navigate_next, | |
color: Colors.white, | |
size: 30, | |
), | |
title: Text( | |
'William J', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 20, | |
fontWeight: FontWeight.bold), | |
), | |
subtitle: Text( | |
'Dubai, UAE', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 12, | |
fontWeight: FontWeight.bold), | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
Padding( | |
padding: EdgeInsets.only( | |
left: 5, | |
top: 12, | |
), | |
child: Align( | |
alignment: Alignment.topLeft, | |
child: ClipOval( | |
child: Container( | |
child: new Image.asset( | |
"assets/image-1.png", | |
fit: BoxFit.fill, | |
width: 75, | |
height: 75, | |
), | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment