Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

flutter code for listview checkbox

Jay Mittal answered on April 25, 2023 Popularity 7/10 Helpfulness 2/10

Contents


More Related Answers

  • flutter checkboslisttile
  • flutter checkbox
  • checkbox in flutter
  • listview in dialog flutter
  • flutter checkbox
  • checkbox in a listview header c#
  • popupmenu with checkbox in flutter
  • checkboslisttilw in flutter
  • flutter add checkbox
  • flutter hide checkbox in checkboxlisttile

  • flutter code for listview checkbox

    0

    class CheckBoxInListView extends StatefulWidget {

    @override

    _CheckBoxInListViewState createState() => _CheckBoxInListViewState();

    }

    class _CheckBoxInListViewState extends State {

    List _texts = [

    "InduceSmile.com",

    "Flutter.io",

    "google.com",

    "youtube.com",

    "yahoo.com",

    "gmail.com"

    ];

    List _isChecked;

    @override

    void initState() {

    super.initState();

    _isChecked = List.filled(_texts.length, false);

    }

    @override

    Widget build(BuildContext context) {

    return ListView.builder(

    itemCount: _texts.length,

    itemBuilder: (context, index) {

    return CheckboxListTile(

    title: Text(_texts[index]),

    value: _isChecked[index],

    onChanged: (val) {

    setState(

    () {

    _isChecked[index] = val;

    },

    );

    },

    );

    },

    );

    }


    Popularity 7/10 Helpfulness 2/10 Language whatever
    Link to this answer
    Share Copy Link
    Contributed on Apr 25 2023
    Jay Mittal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.