ListView.separated(
itemCount: 3,
// widget in between each item
separatorBuilder: (context, index){
return SizedBox(height: 8.0,);
},
// widget items
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
showGoalDialog(context);
},
child: GoalCard(
name: "Hi",
progress: 20,
dueDate: DateTime(2023, 05, 01),
),
);
},
),
Dart
복사
Expanded(
child: ListView.builder(
itemCount: 3,
itemBuilder: (context, index) {
return ScheduleCard(
startTime: 9,
endTime: 14,
content: "Learn Programming",
color: Colors.red,
);
},
),
)
Dart
복사
•
define size
•
ListView.builder()
•
itemCount
•
itemBuilder (context, index) {}
•
it repeats up to 10, then each one as it scrolls

.png&blockId=fd6a2c12-a171-4498-b370-065e9290fdc3)
.png&blockId=fd6a2c12-a171-4498-b370-065e9290fdc3&width=256)