Search

ListView

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