Skip to content
Snippets Groups Projects
Select Git revision
  • a9cc43cfe9d22e79341dd624655f235d7c4276e7
  • main default protected
2 results

checklist_view.dart

Blame
  • checklist_view.dart 741 B
    import 'package:flutter/material.dart';
    import 'package:second_flutter/checklist_item.dart';
    
    class ChecklistView extends StatefulWidget {
      @override
      State<StatefulWidget> createState() {
        return _ChecklistView();
      }
    }
    
    class _ChecklistView extends State<ChecklistView> {
      List<String> checklist = ["집가고싶다", "과제해야돼", "으아아아악"];
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(title: const Text('checklist')),
          body: Container(
            child: Column(
              children: List<Widget>.generate(checklist.length, (index) {
                return ChecklistItem(title: checklist[index]);
              }),
            ),
          ),
        );
      }
    }