migrate_ design_ widgets
Learn about the migrate_design_widgets linter rule.
Design widgets should be imported from Material or Cupertino packages.
Details
#The 'package:flutter/material.dart' and 'package:flutter/cupertino.dart' libraries are deprecated.
Enable
#
To enable the migrate_design_widgets rule, add migrate_design_widgets under
linter > rules in your analysis_options.yaml
file:
linter:
rules:
- migrate_design_widgets
If you're instead using the YAML map syntax to configure linter rules,
add migrate_design_widgets: true under linter > rules:
linter:
rules:
migrate_design_widgets: true
Unless stated otherwise, the documentation on this site reflects Dart 3.12.2. Report an issue.