File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class _ArchiveTableState extends State<ArchiveTable> {
8686 th ([text ('Flutter version' )]),
8787 th ([text ('Architecture' )]),
8888 th ([text ('Ref' )]),
89- th (classes: 'date' , [text ('Release Date ' )]),
89+ th (classes: 'date' , [text ('Release date ' )]),
9090 th ([text ('Dart version' )]),
9191 th ([text ('Provenance' )]),
9292 ]),
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import 'package:universal_web/js_interop.dart';
99
1010/// Represents a Flutter release loaded from the Flutter releases endpoint.
1111class FlutterRelease {
12+ static final RegExp _dartSdkBuildPattern = RegExp (r'\(build\s(.*?)\)' );
13+
1214 FlutterRelease ({
1315 required this .url,
1416 required this .version,
@@ -20,12 +22,18 @@ class FlutterRelease {
2022 });
2123
2224 factory FlutterRelease .fromJson (Map <String , Object ?> json, String baseUrl) {
25+ final dartSdkVersion = switch (json['dart_sdk_version' ]) {
26+ final String rawDartSdkVersion when rawDartSdkVersion.isNotEmpty =>
27+ _dartSdkBuildPattern.firstMatch (rawDartSdkVersion)? .group (1 ) ??
28+ rawDartSdkVersion.trim (),
29+ _ => '-' ,
30+ };
31+
2332 return FlutterRelease (
2433 url: '$baseUrl /${json ['archive' ] as String }' ,
2534 version: json['version' ] as String ,
2635 channel: json['channel' ] as String ,
27- dartSdkVersion:
28- (json['dart_sdk_version' ] as String ? )? .split (' ' )[0 ] ?? '-' ,
36+ dartSdkVersion: dartSdkVersion,
2937 architecture: (json['dart_sdk_arch' ] as String ? ) ?? 'x64' ,
3038 hash: (json['hash' ] as String ).substring (0 , 7 ),
3139 releaseDate: Date (Date .parse (json['release_date' ] as String )),
Original file line number Diff line number Diff line change 22// dart format off
33
44/// The generated hash of the `main.css` file.
5- const generatedStylesHash = 'ugxj95DjrnBJ ' ;
5+ const generatedStylesHash = 'nvTevrLjFn98 ' ;
You can’t perform that action at this time.
0 commit comments