Skip to content

Instantly share code, notes, and snippets.

@DasJennir
Created December 27, 2020 16:54
Show Gist options
  • Save DasJennir/a1ed93066f5e122bfa87131060232be1 to your computer and use it in GitHub Desktop.
Save DasJennir/a1ed93066f5e122bfa87131060232be1 to your computer and use it in GitHub Desktop.
Testimonials Row Flutter
SizedBox(
height: 200,
child: ListView(
// This next line does the trick.
scrollDirection: Axis.horizontal,
children: <Widget>[
GestureDetector(
onTap: () {
showDialog(
context: context,
child: AlertDialog(
title: Text(
"This has completly changed my life..."),
content: Text(
"Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old."),
));
},
child: Container(
width: 160.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(1),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(
top: 20,
),
child: CircleAvatar(
radius: 50,
backgroundImage: AssetImage(
'assets/images/ana.jpg'))),
Text(
'Ana Paula',
style: TextStyle(
fontSize: 20,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
),
Text(
'BookED was...',
style: TextStyle(
fontSize: 15,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
),
Container(
height: 20,
margin: const EdgeInsets.only(
top: 15.0, right: 5.0),
child: Align(
alignment: Alignment.topRight,
child: FittedBox(
child: Icon(
Icons.zoom_out_map_rounded),
fit: BoxFit.fill))),
],
))),
GestureDetector(
onTap: () {
showDialog(
context: context,
child: AlertDialog(
title: Text(
"This has completly changed my life..."),
content: Text(
"Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old."),
));
},
child: Container(
// margin: EdgeInsets.only(right: 15),
width: 160.0,
decoration: BoxDecoration(
color: Colors.green,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(
top: 20,
),
child: CircleAvatar(
radius: 50,
backgroundImage: AssetImage(
'assets/images/ana.jpg'))),
Text(
'Ana Paula',
style: TextStyle(
fontSize: 20,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
),
Text(
'BookED was...',
style: TextStyle(
fontSize: 15,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
)
],
))),
GestureDetector(
onTap: () {
showDialog(
context: context,
child: AlertDialog(
title: Text(
"This has completly changed my life..."),
content: Text(
"Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old."),
));
},
child: Container(
width: 160.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(
top: 20,
),
child: CircleAvatar(
radius: 50,
backgroundImage: AssetImage(
'assets/images/ana.jpg'))),
Text(
'Ana Paula',
style: TextStyle(
fontSize: 20,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
),
Text(
'BookED was...',
style: TextStyle(
fontSize: 15,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
)
],
))),
GestureDetector(
onTap: () {
showDialog(
context: context,
child: AlertDialog(
title: Text(
"This has completly changed my life..."),
content: Text(
"Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old."),
));
},
child: Container(
width: 160.0,
decoration: BoxDecoration(
color: Colors.green,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(
top: 20,
),
child: CircleAvatar(
radius: 50,
backgroundImage: AssetImage(
'assets/images/ana.jpg'))),
Text(
'Ana Paula',
style: TextStyle(
fontSize: 20,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
),
Text(
'BookED was...',
style: TextStyle(
fontSize: 15,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
)
],
))),
GestureDetector(
onTap: () {
showDialog(
context: context,
child: AlertDialog(
title: Text(
"This has completly changed my life..."),
content: Text(
"Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old."),
));
},
child: Container(
width: 160.0,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(
0, 3), // changes position of shadow
),
],
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(
top: 20,
),
child: CircleAvatar(
radius: 50,
backgroundImage: AssetImage(
'assets/images/ana.jpg'))),
Text(
'Ana Paula',
style: TextStyle(
fontSize: 20,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
),
Text(
'BookED was...',
style: TextStyle(
fontSize: 15,
fontFamily: 'Arial',
color: Colors.black),
textAlign: TextAlign.center,
)
],
))),
],
)),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment