Skip to content

Instantly share code, notes, and snippets.

@ThinkDigitalSoftware
Created December 8, 2018 21:45
Show Gist options
  • Save ThinkDigitalSoftware/c82fc7c429e92011f920cbc9c44054a4 to your computer and use it in GitHub Desktop.
Save ThinkDigitalSoftware/c82fc7c429e92011f920cbc9c44054a4 to your computer and use it in GitHub Desktop.
Card(
color: backgroundColor,
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 5),
child: Padding(
padding: const EdgeInsets.only(
left: 15,
right: 5,
top: 8,
bottom: 8), //symmetric(vertical: 8.0, horizontal: 15),
child: new Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Flexible(child: buildProfileColumn()),
SizedBox(
width: spacing,
),
Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Wrap(children: [
IconButton(
icon: Image.asset('assets/underwear.png',
color: vm.teacherManageState.kids[index].underwear
? Colors.brown
: Colors.grey),
onPressed: () {
vm.onSuppliesChange(
vm.teacherManageState.kids[index].kid.id,
!vm.teacherManageState.kids[index].underwear,
vm.teacherManageState.kids[index].pants,
vm.teacherManageState.kids[index].shirt,
vm.teacherManageState.kids[index].sock,
vm.teacherManageState.kids[index].blanket,
vm.teacherManageState.kids[index].suppliesController
.text,
);
},
iconSize: iconSize,
),
IconButton(
icon: Image.asset('assets/pant.png',
color: vm.teacherManageState.kids[index].pants
? Colors.brown
: Colors.grey),
onPressed: () {
vm.onSuppliesChange(
vm.teacherManageState.kids[index].kid.id,
vm.teacherManageState.kids[index].underwear,
!vm.teacherManageState.kids[index].pants,
vm.teacherManageState.kids[index].shirt,
vm.teacherManageState.kids[index].sock,
vm.teacherManageState.kids[index].blanket,
vm.teacherManageState.kids[index].suppliesController
.text,
);
},
iconSize: iconSize,
),
IconButton(
icon: Image.asset('assets/shirt.png',
color: vm.teacherManageState.kids[index].shirt
? Colors.brown
: Colors.grey),
onPressed: () {
vm.onSuppliesChange(
vm.teacherManageState.kids[index].kid.id,
vm.teacherManageState.kids[index].underwear,
vm.teacherManageState.kids[index].pants,
!vm.teacherManageState.kids[index].shirt,
vm.teacherManageState.kids[index].sock,
vm.teacherManageState.kids[index].blanket,
vm.teacherManageState.kids[index].suppliesController
.text,
);
},
iconSize: iconSize,
),
IconButton(
icon: Image.asset('assets/sock.png',
color: vm.teacherManageState.kids[index].sock
? Colors.brown
: Colors.grey),
onPressed: () {
vm.onSuppliesChange(
vm.teacherManageState.kids[index].kid.id,
vm.teacherManageState.kids[index].underwear,
vm.teacherManageState.kids[index].pants,
vm.teacherManageState.kids[index].shirt,
!vm.teacherManageState.kids[index].sock,
vm.teacherManageState.kids[index].blanket,
vm.teacherManageState.kids[index].suppliesController
.text,
);
},
iconSize: iconSize,
),
IconButton(
icon: Image.asset('assets/blanket.png',
color: vm.teacherManageState.kids[index].blanket
? Colors.brown
: Colors.grey),
onPressed: () {
vm.onSuppliesChange(
vm.teacherManageState.kids[index].kid.id,
vm.teacherManageState.kids[index].underwear,
vm.teacherManageState.kids[index].pants,
vm.teacherManageState.kids[index].shirt,
vm.teacherManageState.kids[index].sock,
!vm.teacherManageState.kids[index].blanket,
vm.teacherManageState.kids[index].suppliesController
.text,
);
},
iconSize: iconSize,
),
]),
Padding(
padding: const EdgeInsets.only(
left: 8.0, bottom: 18.0, right: 0.0),
child: TeddyFormElements.nullableTextFormFieldWithHint(
vm.teacherManageState.kids[index].suppliesController,
"Comments",
visible: true,
),
),
]),),
],
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment