Created
November 12, 2020 08:06
-
-
Save usimsek/3860cbfb0c20ad89c5b150ab1026a3e9 to your computer and use it in GitHub Desktop.
Flutter complex json to view
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
ListView _buildListview(AsyncSnapshot<List<GiyimModel>> snapshot) { | |
return ListView.builder( | |
itemCount: snapshot.data.length, | |
shrinkWrap: true, | |
itemBuilder: (BuildContext context, int index) { | |
GiyimModel item = snapshot.data[index]; | |
return Container( | |
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 15), | |
decoration: BoxDecoration( | |
color: Colors.white, | |
borderRadius: BorderRadius.circular(6), | |
boxShadow: [ | |
BoxShadow( | |
color: Theme.of(context).hintColor.withOpacity(0.15), | |
offset: Offset(0, 3), | |
blurRadius: 10) | |
], | |
), | |
child: ListView.builder( | |
itemCount: item.kiyafetDonemItemList.length, | |
shrinkWrap: true, | |
physics: NeverScrollableScrollPhysics(), | |
itemBuilder: (BuildContext context, int index2) { | |
return ListView( | |
shrinkWrap: true, | |
primary: false, | |
children: <Widget>[ | |
ListTile( | |
// leading: Image.asset( | |
// "assets/icon/egitim-icon.png", | |
// height: 30, | |
// ), | |
title: Text( | |
item.kiyafetDonem.bitisTarihi.toString(), | |
), | |
), | |
ListTile( | |
title: Text( | |
item.kiyafetDonemItemList[index2].kiyafetDonemItem.adi, | |
style: Helper.cardHeader1, | |
), | |
), | |
ListView.builder( | |
itemCount: item.kiyafetDonemItemList[index] | |
.kiyafetDonemItemSecenekLineList.length, | |
shrinkWrap: true, | |
physics: NeverScrollableScrollPhysics(), | |
itemBuilder: (BuildContext context, int index3) { | |
return Wrap( | |
alignment: WrapAlignment.center, | |
spacing: 8.0, | |
runSpacing: 8.0, | |
children: [ | |
RaisedButton( | |
onPressed: () {}, | |
child: Text(item | |
.kiyafetDonemItemList[index] | |
.kiyafetDonemItemSecenekLineList[index3] | |
.kiyafetDonemItemSecenek | |
.adi), | |
), | |
], | |
); | |
}, | |
), | |
], | |
); | |
}, | |
), | |
); | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment