Commit Graph

52 Commits

Author SHA1 Message Date
Kate Lovett
62586dc09d
Update old wiki links (#149544)
Part of https://github.com/flutter/flutter/issues/145009

Finishes updating links in the repo that pointed to the old wiki
2024-06-17 17:26:08 +00:00
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
Pierre-Louis
0919fb86f1
Improve handling of certain icons in RTL (#130979)
Fixes https://github.com/flutter/flutter/issues/130978 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-07-21 19:07:39 +02:00
Pierre-Louis
d8f7c3d362
Refactor icon update script (#122392)
* x

* docs
2023-03-13 22:17:35 +01:00
Pierre-Louis
ac905b29a4
Add option to specify class name (#109865) 2022-08-24 18:53:27 +02:00
Michael Goderbauer
10a7c9ba22
Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00
Alexandre Ardhuin
d40ee2149c
remove unnecessary .toString() (#103226) 2022-05-06 16:04:13 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Pierre-Louis
7855132341
Generate a demo for new icons when updating icons (#101190)
* add code to generate new icon demo and make font family optional

* remove trailing spaces

* Update update_icons_test.dart

* remove trailing space
2022-04-05 12:56:23 +02:00
Pierre-Louis
b4abc233ee
Update visibility of methods for internal use (#98124) 2022-03-09 17:32:11 +01:00
Pierre-Louis
6bd0b95728
[Icons] Prevent double underscores after replacement (#96904)
* Prevent double underscores after replacement

* add test

* remove trailing space
2022-01-30 13:16:32 +01:00
Pierre-Louis
b23f207e2c
Improve update_icons.dart script (#93863)
* Update update_icons.dart

* formatting

* more formatting

* simplify safety checks

* add safety checks tests

* formatting

* update copyright

* naming

* revert copyright

* add `fontFamily` option

* tweak diff messages

* Update update_icons.dart

* don't exit if platform adaptive icon not found

* remove trailing spaces

* remove warning and fix insert_chart (outlined) dartdoc

* x

* add error message when exiting due to failed safety checkes

* fix icon reference

* fix rewrite for onetwothree
2021-12-08 16:31:48 +01:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be24.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Anis Alibegić
a753d09cc9
Fixed several typos (#89485) 2021-09-07 14:56:04 -07:00
Pierre-Louis
85ffa8ce18
[Fonts] Improved icons update script (#88153)
* Improved update_icons.dart

* Handle _

* Update dartdoc

* Rename function

* formatting

* fix type

* Refactor ID generation

* rename

* cleanup

* update comment

* replace typedef with type
2021-08-15 12:56:58 +02:00
Pierre-Louis
7d026b6b8b
Fix regression (#86657) 2021-07-20 14:58:12 +02:00
Pierre-Louis
0d7e6798c9
[Fonts] Use exact matching for icon identifier rewrites (#86464)
* Fix sorting

* Update icons.dart

* [Fonts] Use instead matching instead of prefix

* Add new
2021-07-15 15:20:46 +02:00
Pierre-Louis
666185c027
[Fonts] Fix icons sorting (#86434)
* Fix sorting

* Update icons.dart
2021-07-14 23:25:16 +02:00
Abhishek Ghaskata
2da969aa9b
migrate update_icons to null safety (#84063) 2021-06-09 13:59:03 -07:00
Christopher Fujino
8654e4ae3e
begin migrating //flutter/dev/tools to null-safety (#80834) 2021-04-23 20:24:03 -07:00
Pierre-Louis
c49cd2719d
[Fonts] Remove update_icons TODO (#79027) 2021-03-25 09:29:02 -07:00
Pierre-Louis
961fdeebb8
[Fonts] Fix update_icons double newline bug (#78317) 2021-03-16 10:03:03 -07:00
Pierre-Louis
948ff0f2b0
[Fonts] Sort material icons (#76691)
* Update update_icons.dart

* Merge and simplify identifier rewrites

* Update update_icons.dart

* Update update_icons.dart

* Update update_icons.dart

* Add newline

* remove whitespace

* Copy instead of moving

* Fix typo

* Clean up code

Introduce fullFlutterId and fix a small dartdoc bug

* Update update_icons.dart

* Implement sorting

* Remove trailing spaces

* Revert "Remove trailing spaces"

This reverts commit c198a16067.

* Revert "Implement sorting"

This reverts commit 0fac8c1f1c.

* Revert "Revert "Implement sorting""

This reverts commit 0f8ec2381a.

* Revert "Revert "Remove trailing spaces""

This reverts commit c3ef865879.

* xx

* add braces
2021-03-09 16:14:18 +01:00
Pierre-Louis
698d438960
[Fonts] Improve update_icons script (#76532)
* Update update_icons.dart

* Merge and simplify identifier rewrites

* Update update_icons.dart

* Update update_icons.dart

* Update update_icons.dart

* Add newline

* remove whitespace

* Copy instead of moving

* Fix typo

* Clean up code

Introduce fullFlutterId and fix a small dartdoc bug

* Update update_icons.dart

* Implement sorting

* Remove trailing spaces

* Revert "Remove trailing spaces"

This reverts commit c198a16067.

* Revert "Implement sorting"

This reverts commit 0fac8c1f1c.

* Remove trailing space

* Add bug number

* Rename 2d rewrite

* Add _replaceLast

* Add comment

* Simplify, remove fullFlutterId

* Remove IconStyle and reorder

* xx

* reorder
2021-03-09 07:53:21 +01:00
Pierre-Louis
371dd87aa0
Make it possible to run in google3 (#76392) 2021-02-20 13:11:58 +01:00
Pierre-Louis
a51b8e4309
Fix text direction logic for material icon variants (#71852) 2020-12-08 09:08:05 -08:00
Pierre-Louis
a7f5fd5360
Update documentation link (#71401) 2020-11-30 13:14:13 +01:00
Pierre-Louis
2f17d4e017
Adaptive icons (#69119)
* refactor update_icons

* fix trailing space

* address feedback

* add platform adaptive icons

* fix merge conflict

* Update dartdoc

* Address feedback

* Specify types

* Add tests

* fix indentation

* Remove trailing space

* Remove isCupertino static bool
2020-11-18 16:04:38 +01:00
Pierre-Louis
bacc03daf9
Refactor update_icons (#68708)
* refactor update_icons

* fix trailing space

* address feedback

* Rename to _iconsMirroredWhenRTL
2020-10-26 16:35:58 +01:00
Alexandre Ardhuin
73301a35a2
Sync lints (#68136) 2020-10-15 15:37:04 -07:00
Will Larche
ee6d4c6590
[Docs] [Material] Fix Icons api docs (#66508)
* [Docs] [Icons] Updating dart doc styles to recognize more styles of icons. All the 4 icon styles we support have to be pulled from 4 individual web fonts when we show the html page for api docs.

* Better documentation and that special awful case.

* Couple more places to remove.
2020-09-24 15:18:10 -04:00
Mehmet Fidanboylu
db2ecf4486
Expose certain functions used when rolling Flutter (#62529) 2020-07-29 22:24:52 -07:00
Will Larche
7782845edd
[Material] Updated icons and fonts (#61778) 2020-07-24 15:41:13 -07:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Alexandre Ardhuin
ec1a015045
implicit-casts:false in dev (#45787) 2019-12-05 22:34:06 +01:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Phil Quitslund
802eca29d2
set literal conversions (#27811) 2019-03-06 11:05:16 -08:00
Alexandre Ardhuin
f62afdcf57
add missing type parameter on methods (#22096) 2018-10-01 21:29:08 +02:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Janice Collins
5e39476aef
Remove workaround for markup stripping dartdoc bug (#20748)
* Remove workaround for dart-lang/dartdoc#1125

* Update update_icons.dart for optional const and to remove markup stripping workaround
2018-08-28 13:23:07 -07:00
Keerti Parthasarathy
0098b11d8e
modify update_icons script to handle some more numerical values. (#20387)
* update script

* Update update_icons.dart

* Update update_icons.dart
2018-08-09 14:47:41 -07:00
Alexandre Ardhuin
eda03e2586
re-re-enable lint unnecessary_const (#20103) 2018-08-02 12:02:32 +02:00
Todd Volkert
00aac68e2d
Revert flutter/flutter#19592 (#19861)
It was causing problems rolling Flutter into Fuchsia
2018-07-27 08:44:39 -07:00
Alexandre Ardhuin
27018359d2
re-enable lint unnecessary_const (#19592)
* re-enable lint unnecessary_const

* remove trailling whitespaces

* remove unnecessary const (after merge)
2018-07-23 08:31:48 +02:00
Ian Hickson
f630f90d6d
Revert "enable lint unnecessary_const (#19342)" (#19423)
This reverts commit cc1cf13eec.
2018-07-16 13:30:27 -07:00
Alexandre Ardhuin
cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Ian Hickson
97b3742f63
Automatically flip material icons in RTL. (#12876)
I'm not really sure how to test this without a reference test, since
eventually we want to move this to a font feature and thus the obvious
test (looking for the Transform widget) isn't really valid.
2017-11-08 14:22:14 -08:00
xster
40b67bb187 Move icons stuff from material to widget (#10192)
Moved everything icons related except the material icon button and the materialicon font list to widget
2017-05-21 16:57:31 -07:00