Skip to content

Commit 7759c1d

Browse files
authored
Migrate to null safety (flutter#110)
- *Breaking* The `Font.merge` and `BoxEdge.merge` factory constructors are now static methods since a factory constructor can't return null, but that was the entire point of these constructors. - Add nullable return types on methods that have a branch returning `null`. - Add a lot of `?` on parameters that can't provably be non-null. - Add a lot of `!`. - Add overrides of `TreeNode.clone` to tighten the return type in a few places and allow some skipped explicit casts. - Remove some dead code on conditional branches that never would have been followed, even before the migration, but weren't obvious statically. - Add explicit casts.
1 parent 1e96b6c commit 7759c1d

30 files changed

+617
-671
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
## 0.16.3-dev
1+
## 0.17.0-nullsafety-dev
2+
3+
- `Font.merge` and `BoxEdge.merge` are now static methods instead of factory
4+
constructors.
25

36
## 0.16.2
47

58
- Added support for escape codes in identifiers.
69

710
## 0.16.1
8-
11+
912
- Fixed a crash caused by parsing certain calc() expressions and variables names that contain numbers.
1013

1114
## 0.16.0

example/call_parser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const _default = css.PreprocessorOptions(
1414
/// CSS will allow any property/value pairs regardless of validity; all of our
1515
/// tests (by default) will ensure that the CSS is really valid.
1616
StyleSheet parseCss(String cssInput,
17-
{List<css.Message> errors, css.PreprocessorOptions opts}) {
17+
{List<css.Message>? errors, css.PreprocessorOptions? opts}) {
1818
return css.parse(cssInput, errors: errors, options: opts ?? _default);
1919
}
2020

0 commit comments

Comments
 (0)