Unverified Commit 6cb91b1c authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Be more consistent about how we mark classes that can't be extended. (#81632)

parent 56726796
...@@ -18,6 +18,8 @@ typedef ChildLayouter = Size Function(RenderBox child, BoxConstraints constraint ...@@ -18,6 +18,8 @@ typedef ChildLayouter = Size Function(RenderBox child, BoxConstraints constraint
/// ///
/// All of the functions adhere to the [ChildLayouter] signature. /// All of the functions adhere to the [ChildLayouter] signature.
class ChildLayoutHelper { class ChildLayoutHelper {
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
const ChildLayoutHelper._(); const ChildLayoutHelper._();
/// Returns the [Size] that the [RenderBox] would have if it were to /// Returns the [Size] that the [RenderBox] would have if it were to
......
...@@ -32,7 +32,7 @@ enum CacheExtentStyle { ...@@ -32,7 +32,7 @@ enum CacheExtentStyle {
abstract class RenderAbstractViewport extends RenderObject { abstract class RenderAbstractViewport extends RenderObject {
// This class is intended to be used as an interface, and should not be // This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension. // extended directly; this constructor prevents instantiation and extension.
factory RenderAbstractViewport._() => throw Error(); RenderAbstractViewport._();
/// Returns the [RenderAbstractViewport] that most tightly encloses the given /// Returns the [RenderAbstractViewport] that most tightly encloses the given
/// render object. /// render object.
......
...@@ -12,6 +12,8 @@ import 'text_input.dart'; ...@@ -12,6 +12,8 @@ import 'text_input.dart';
/// documentation for their availability on each platform, and the platform /// documentation for their availability on each platform, and the platform
/// values each autofill hint corresponds to. /// values each autofill hint corresponds to.
class AutofillHints { class AutofillHints {
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
AutofillHints._(); AutofillHints._();
/// The input field expects an address locality (city/town). /// The input field expects an address locality (city/town).
......
...@@ -417,7 +417,7 @@ class SystemMouseCursor extends MouseCursor { ...@@ -417,7 +417,7 @@ class SystemMouseCursor extends MouseCursor {
class SystemMouseCursors { class SystemMouseCursors {
// This class only contains static members, and should not be instantiated or // This class only contains static members, and should not be instantiated or
// extended. // extended.
factory SystemMouseCursors._() => throw Error(); SystemMouseCursors._();
// The mapping in this class must be kept in sync with the following files in // The mapping in this class must be kept in sync with the following files in
// the engine: // the engine:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment