Be more consistent about how we mark classes that can't be extended. (#81632)
This commit is contained in:
@@ -18,6 +18,8 @@ typedef ChildLayouter = Size Function(RenderBox child, BoxConstraints constraint
|
||||
///
|
||||
/// All of the functions adhere to the [ChildLayouter] signature.
|
||||
class ChildLayoutHelper {
|
||||
// This class is not meant to be instantiated or extended; this constructor
|
||||
// prevents instantiation and extension.
|
||||
const ChildLayoutHelper._();
|
||||
|
||||
/// Returns the [Size] that the [RenderBox] would have if it were to
|
||||
|
||||
@@ -32,7 +32,7 @@ enum CacheExtentStyle {
|
||||
abstract class RenderAbstractViewport extends RenderObject {
|
||||
// This class is intended to be used as an interface, and should not be
|
||||
// extended directly; this constructor prevents instantiation and extension.
|
||||
factory RenderAbstractViewport._() => throw Error();
|
||||
RenderAbstractViewport._();
|
||||
|
||||
/// Returns the [RenderAbstractViewport] that most tightly encloses the given
|
||||
/// render object.
|
||||
|
||||
@@ -12,6 +12,8 @@ import 'text_input.dart';
|
||||
/// documentation for their availability on each platform, and the platform
|
||||
/// values each autofill hint corresponds to.
|
||||
class AutofillHints {
|
||||
// This class is not meant to be instantiated or extended; this constructor
|
||||
// prevents instantiation and extension.
|
||||
AutofillHints._();
|
||||
|
||||
/// The input field expects an address locality (city/town).
|
||||
|
||||
@@ -417,7 +417,7 @@ class SystemMouseCursor extends MouseCursor {
|
||||
class SystemMouseCursors {
|
||||
// This class only contains static members, and should not be instantiated or
|
||||
// extended.
|
||||
factory SystemMouseCursors._() => throw Error();
|
||||
SystemMouseCursors._();
|
||||
|
||||
// The mapping in this class must be kept in sync with the following files in
|
||||
// the engine:
|
||||
|
||||
Reference in New Issue
Block a user