@@ -5,7 +5,6 @@ import 'package:flutter/services.dart';
5
5
import 'package:flutter/widgets.dart'
6
6
show Color, ColorSwatch, WidgetsFlutterBinding;
7
7
import 'package:http/http.dart' as http show get;
8
- import 'package:meta/meta.dart' show sealed;
9
8
10
9
import 'cache/cache.dart' ;
11
10
import 'cache/exception.dart' ;
@@ -15,7 +14,7 @@ const String _src =
15
14
"https://raw.githubusercontent.com/ozh/github-colors/master/colors.json" ;
16
15
17
16
/// An [Error] thrown when response unsuccessfully and no cache can be used.
18
- class GitHubColourHTTPLoadFailedError extends GitHubColourLoadFailedError {
17
+ final class GitHubColourHTTPLoadFailedError extends GitHubColourLoadFailedError {
19
18
/// HTTP response code when fetching colour data.
20
19
final int responseCode;
21
20
@@ -28,7 +27,7 @@ class GitHubColourHTTPLoadFailedError extends GitHubColourLoadFailedError {
28
27
}
29
28
30
29
/// An [Error] thrown when no resources available to initalize [GitHubColour] .
31
- class GitHubColourNoAvailableResourceError extends GitHubColourLoadFailedError {
30
+ final class GitHubColourNoAvailableResourceError extends GitHubColourLoadFailedError {
32
31
GitHubColourNoAvailableResourceError ._();
33
32
34
33
@override
@@ -53,8 +52,7 @@ Map<String, Color> _colourReader(String json) =>
53
52
///
54
53
/// Since 2.0.0, [GitHubColour] implemented [ColorSwatch] that getting colour
55
54
/// can be more convenience. And serval old API will be [Deprecated] .
56
- @sealed
57
- class GitHubColour extends UnmodifiableMapBase <String , Color >
55
+ final class GitHubColour extends UnmodifiableMapBase <String , Color >
58
56
implements ColorSwatch <String > {
59
57
static GitHubColour ? _instance;
60
58
final Map <String , Color > _githubLangColour;
0 commit comments