GitHub

    Table of contents

  1. Example
  2. Related Links

CheckboxListTile

Edit this page

A ListTile with a Checkbox. In other words, a checkbox with a label.

Example

import 'package:flutter/scheduler.dart' show timeDilation;

// ...


Widget build(BuildContext context) {
  return Center(
    child: CheckboxListTile(
      title: const Text('Animate Slowly'),
      value: timeDilation != 1.0,
      onChanged: (bool value) {
        setState(() { timeDilation = value ? 10.0 : 1.0; });
      },
      secondary: const Icon(Icons.hourglass_empty),
    ),
  );
}

Related Links