Skip to content

Instantly share code, notes, and snippets.

@moho12n
Last active June 14, 2020 20:27
Show Gist options
  • Save moho12n/d6d4dc53948d14d79a6db13ec1df16a8 to your computer and use it in GitHub Desktop.
Save moho12n/d6d4dc53948d14d79a6db13ec1df16a8 to your computer and use it in GitHub Desktop.
PageView.Builder
Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: const EdgeInsets.only(bottom: 78.0),
child: SizedBox(
height: 116, // card height
child: PageView.builder(
itemCount: 3, // how many items do we have
controller: PageController(viewportFraction: 0.9),
onPageChanged: (int index) {
},
itemBuilder: (_, i) {
return Transform.scale(
scale: i == _index ? 1 : 0.9,
child: new Container(
height: 116.00,
width: 325.00,
decoration: BoxDecoration(
color: Color(0xffffffff),
boxShadow: [
BoxShadow(
offset: Offset(0.5, 0.5),
color:
Color(0xff000000).withOpacity(0.12),
blurRadius: 20,
),
],
borderRadius: BorderRadius.circular(10.00),
),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(
left: 9, top: 7, bottom: 7, right: 9),
child: Container(
height: 86.00,
width: 86.00,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(//image Link),
),
borderRadius:
BorderRadius.circular(5.00),
),
),
),
Padding(
padding: const EdgeInsets.only(
top: 12, right: 0.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Wrap(
alignment: WrapAlignment.start,
spacing: 2,
direction: Axis.vertical,
children: <Widget>[
Text("name",
style: TextStyle(
fontFamily: "Montserrat",
fontSize: 15,
color: Color(0xff000000),
),
),
Container(
width: 230,
child: Text(
"description",
overflow:
TextOverflow.ellipsis,
maxLines: 4,
style: TextStyle(
fontFamily: "Montserrat",
fontSize: 10,
color: Color(0xff000000),
),
),
),
],
)
],
),
),
],
),
),
);
},
),
),
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment