dart-learn icon indicating copy to clipboard operation
dart-learn copied to clipboard

课程内容勘误: switch的 break 并非必要

Open kevin-antai opened this issue 1 year ago • 1 comments

switch 的 break 在 3.0 之后 除非是需要提前跳出,否则是不需要 break 的,不会出现 case 穿透的情况

参考文档: https://dart.dev/tools/linter-rules/unnecessary_breaks

kevin-antai avatar May 09 '24 07:05 kevin-antai

对应视频: https://ducafecat.com/course/dart-learn/dart-14-flow

kevin-antai avatar May 09 '24 08:05 kevin-antai