title: How to create long list of a widget with dynamic content without writing the same code again and again?
body: <p>I want to create 60 CheckboxListTile list. The CheckboxListTiles would have a roll no. of 60 students. So, I want to generate the list without copying the CheckboxListTile 60 times.
  And this is how to end result should look like:
  <a href="https://i.stack.imgur.com/svGkT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/svGkT.png" alt="enter image description here" /></a></p>
  <p>And here's the code</p>
  <pre><code>import 'package:flutter/material.dart';
  
  bool _tapped = false;
  
  class AttendenceScr extends StatefulWidget {
    static String id = 'attendence_page';
  
    @override
    _AttendenceScrState createState() =&gt; _AttendenceScrState();
  }
  
  class _AttendenceScrState extends State&lt;AttendenceScr&gt; {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text('Attendence Page'),
          backgroundColor: Colors.redAccent,
        ),
        body: Container(
          child: CheckboxListTile(
            checkColor: Colors.red,
            title: Text('  Roll No.1'),
            secondary: Icon(Icons.person_pin),
            controlAffinity: ListTileControlAffinity.trailing,
            value: _tapped,
            onChanged: (value) {
              setState(() {
                _tapped = value;
              });
            },
          ),
        ),
      );
    }
  }
  </code></pre>