flutter/dev/integration_tests/flutter_gallery/lib/demo
Nate 2e748e8598
Implementing control flow collections (#146601)
This pull request aims for improved readability, based on issue #146600.

```dart
// before
Set<Color> _distinctVisibleColors() {
  final Set<Color> distinctVisibleColors = <Color>{};
  if (top.style != BorderStyle.none) {
    distinctVisibleColors.add(top.color);
  }
  if (right.style != BorderStyle.none) {
    distinctVisibleColors.add(right.color);
  }
  if (bottom.style != BorderStyle.none) {
    distinctVisibleColors.add(bottom.color);
  }
  if (left.style != BorderStyle.none) {
    distinctVisibleColors.add(left.color);
  }
  return distinctVisibleColors;
}

// after
Set<Color> _distinctVisibleColors() {
  return <Color>{
    if (top.style != BorderStyle.none) top.color,
    if (right.style != BorderStyle.none) right.color,
    if (bottom.style != BorderStyle.none) bottom.color,
    if (left.style != BorderStyle.none) left.color,
  };
}
```

Most of the repo should be covered in this PR (aside from `flutter_tools/`, since there was a lot going on in there).
2024-04-15 16:06:07 +00:00
..
animation cleanup now-irrelevant ignores for deprecated_member_use (#143403) 2024-02-14 21:08:25 +00:00
calculator Implementing control flow collections (#146601) 2024-04-15 16:06:07 +00:00
cupertino Refactor to use Apple system fonts (#137275) 2023-11-29 21:03:32 +00:00
fortnightly Enable use_colored_box lint (#117370) 2022-12-20 14:09:55 -08:00
material Refactoring if chains into switch statements (#144905) 2024-03-11 23:04:57 +00:00
shrine Reland "Reland - Introduce tone-based surfaces and accent color add-ons - Part 2" (#144273) 2024-02-28 13:55:50 -08:00
transformations implement Iterator and Comparable instead of extending them (#123282) 2023-03-23 17:10:31 +00:00
all.dart
animation_demo.dart Prepare flutter_gallery for use_super_parameters (#100515) 2022-03-28 16:04:22 -07:00
calculator_demo.dart Prepare flutter_gallery for use_super_parameters (#100515) 2022-03-28 16:04:22 -07:00
colors_demo.dart Deprecate 2018 text theme parameters (#109817) 2022-08-22 20:00:34 +00:00
contacts_demo.dart Dev, examples/api, etc updated for Material 3 by default (#129683) 2023-06-28 09:41:58 -07:00
images_demo.dart Prepare flutter_gallery for use_super_parameters (#100515) 2022-03-28 16:04:22 -07:00
pesto_demo.dart Update Gallery demo app themes for Material3 compatibility (#131093) 2023-07-24 15:06:07 +00:00
shrine_demo.dart Prepare flutter_gallery for use_super_parameters (#100515) 2022-03-28 16:04:22 -07:00
typography_demo.dart Deprecate 2018 text theme parameters (#109817) 2022-08-22 20:00:34 +00:00
video_demo.dart Roll dependencies (#139203) 2023-11-29 20:12:59 +00:00