This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ part of dart.ui;
20
20
/// recommended to establish a separate communication channel in that first
21
21
/// message (e.g. by passing a dedicated [SendPort] ).
22
22
class IsolateNameServer {
23
- // This class is only a namespace, and should not be instantiated or
24
- // extended directly .
25
- factory IsolateNameServer ._() => throw UnsupportedError ( 'Namespace' );
23
+ // This class is not meant to be instantiated or extended; this constructor
24
+ // prevents instantiation and extension .
25
+ IsolateNameServer ._();
26
26
27
27
/// Looks up the [SendPort] associated with a given name.
28
28
///
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ part of dart.ui;
7
7
8
8
/// Helper functions for Dart Plugin Registrants.
9
9
class DartPluginRegistrant {
10
+ // This class is not meant to be instantiated or extended; this constructor
11
+ // prevents instantiation and extension.
12
+ DartPluginRegistrant ._();
13
+
10
14
static bool _wasInitialized = false ;
11
15
12
16
/// Makes sure the that the Dart Plugin Registrant has been called for this
Original file line number Diff line number Diff line change @@ -3501,6 +3501,9 @@ class _ColorFilter extends NativeFieldWrapperClass1 {
3501
3501
/// * [SceneBuilder.pushImageFilter] , which is the low-level API for using
3502
3502
/// this class as a child layer filter.
3503
3503
abstract class ImageFilter {
3504
+ // This class is not meant to be extended; this constructor prevents extension.
3505
+ ImageFilter ._(); // ignore: unused_element
3506
+
3504
3507
/// Creates an image filter that applies a Gaussian blur.
3505
3508
factory ImageFilter .blur ({ double sigmaX = 0.0 , double sigmaY = 0.0 , TileMode tileMode = TileMode .clamp }) {
3506
3509
return _GaussianBlurImageFilter (sigmaX: sigmaX, sigmaY: sigmaY, tileMode: tileMode);
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ class CallbackHandle {
40
40
/// * [IsolateNameServer] , which provides utilities for dealing with
41
41
/// [Isolate]s.
42
42
class PluginUtilities {
43
- // This class is only a namespace, and should not be instantiated or
44
- // extended directly .
45
- factory PluginUtilities ._() => throw UnsupportedError ( 'Namespace' );
43
+ // This class is not meant to be instantiated or extended; this constructor
44
+ // prevents instantiation and extension .
45
+ PluginUtilities ._();
46
46
47
47
static final Map <Function , CallbackHandle ?> _forwardCache =
48
48
< Function , CallbackHandle ? > {};
You can’t perform that action at this time.
0 commit comments