Skip to content

Commit

Permalink
Update example in Static access shorthand proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov committed Nov 28, 2024
1 parent 02c4ada commit 89bb040
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion working/3616 - enum value shorthand/proposal-simple-lrhn.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ That means you can write things like the following (with the intended meaning as
comments, specification to achieve that below):

```dart
Endian littleEndian = .little; // -> Endian.little (enum value)
// -> HttpClientResponseCompressionState.compressed (enum value)
HttpClientResponseCompressionState state = .compressed;
Endian littleEndian = .little; // -> Endian.little (constant)
Endian hostEndian = .host; // -> Endian.host (getter)
// -> Endian.little, Endian.big, Endian.host
Endian endian = firstWord == 0xFEFF ? .little : firstWord = 0xFFFE ? .big : .host;
Expand Down

0 comments on commit 89bb040

Please sign in to comment.