mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Use null-aware spread in cupertino/app.dart (#181585)
## Description Adopts null-aware spread syntax (`...?x`) in `cupertino/app.dart`, replacing the verbose `if (x != null) ...x!` pattern. Contributes to https://github.com/flutter/flutter/issues/172188 ## 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]. - [x] I listed at least one issue that this PR fixes in the description above. - [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. [Contributor Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [](https://www.talabat.com) [](https://github.com/search?q=org%3Aflutter+talabat&type=pullrequests)
This commit is contained in:
parent
fa05ce421d
commit
5378bab244
@ -527,7 +527,7 @@ class _CupertinoAppState extends State<CupertinoApp> {
|
||||
// _CupertinoLocalizationsDelegate.
|
||||
Iterable<LocalizationsDelegate<dynamic>> get _localizationsDelegates {
|
||||
return <LocalizationsDelegate<dynamic>>[
|
||||
if (widget.localizationsDelegates != null) ...widget.localizationsDelegates!,
|
||||
...?widget.localizationsDelegates,
|
||||
DefaultCupertinoLocalizations.delegate,
|
||||
];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user