Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
31798757
Unverified
Commit
31798757
authored
Mar 23, 2023
by
Michael Goderbauer
Committed by
GitHub
Mar 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace some ._() constructors with class modifiers (#122765)
parent
7b7af9f3
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
45 additions
and
204 deletions
+45
-204
analysis_options.yaml
analysis_options.yaml
+1
-1
bench_mouse_region_grid_hover.dart
...benchmarks/lib/src/web/bench_mouse_region_grid_hover.dart
+1
-3
bench_mouse_region_grid_scroll.dart
...enchmarks/lib/src/web/bench_mouse_region_grid_scroll.dart
+1
-3
icons.dart
dev/integration_tests/flutter_gallery/lib/gallery/icons.dart
+1
-5
curves.dart
packages/flutter/lib/src/animation/curves.dart
+1
-5
colors.dart
packages/flutter/lib/src/cupertino/colors.dart
+1
-5
icons.dart
packages/flutter/lib/src/cupertino/icons.dart
+1
-5
licenses.dart
packages/flutter/lib/src/foundation/licenses.dart
+1
-5
unicode.dart
packages/flutter/lib/src/foundation/unicode.dart
+1
-4
converter.dart
packages/flutter/lib/src/gestures/converter.dart
+1
-5
hit_test.dart
packages/flutter/lib/src/gestures/hit_test.dart
+3
-15
animated_icons_data.dart
.../lib/src/material/animated_icons/animated_icons_data.dart
+1
-5
chip.dart
packages/flutter/lib/src/material/chip.dart
+6
-30
colors.dart
packages/flutter/lib/src/material/colors.dart
+1
-5
date.dart
packages/flutter/lib/src/material/date.dart
+1
-5
elevation_overlay.dart
packages/flutter/lib/src/material/elevation_overlay.dart
+1
-5
feedback.dart
packages/flutter/lib/src/material/feedback.dart
+1
-5
icons.dart
packages/flutter/lib/src/material/icons.dart
+2
-6
matrix_utils.dart
packages/flutter/lib/src/painting/matrix_utils.dart
+1
-5
layout_helper.dart
packages/flutter/lib/src/rendering/layout_helper.dart
+1
-5
selection.dart
packages/flutter/lib/src/rendering/selection.dart
+1
-3
viewport.dart
packages/flutter/lib/src/rendering/viewport.dart
+1
-5
semantics_service.dart
packages/flutter/lib/src/semantics/semantics_service.dart
+1
-5
clipboard.dart
packages/flutter/lib/src/services/clipboard.dart
+1
-5
deferred_component.dart
packages/flutter/lib/src/services/deferred_component.dart
+1
-5
haptic_feedback.dart
packages/flutter/lib/src/services/haptic_feedback.dart
+1
-5
platform_channel.dart
packages/flutter/lib/src/services/platform_channel.dart
+1
-4
system_channels.dart
packages/flutter/lib/src/services/system_channels.dart
+1
-5
system_chrome.dart
packages/flutter/lib/src/services/system_chrome.dart
+1
-5
system_navigator.dart
packages/flutter/lib/src/services/system_navigator.dart
+1
-5
system_sound.dart
packages/flutter/lib/src/services/system_sound.dart
+1
-5
window.dart
packages/flutter/lib/src/widgets/window.dart
+1
-3
fuchsia_compat.dart
packages/flutter_driver/lib/src/common/fuchsia_compat.dart
+1
-5
event_simulation.dart
packages/flutter_test/lib/src/event_simulation.dart
+1
-5
test_async_utils.dart
packages/flutter_test/lib/src/test_async_utils.dart
+1
-4
common.dart
...es/flutter_tools/lib/src/build_system/targets/common.dart
+1
-4
test_utils.dart
...ages/flutter_tools/test/integration.shard/test_utils.dart
+1
-4
No files found.
analysis_options.yaml
View file @
31798757
...
@@ -42,7 +42,7 @@ linter:
...
@@ -42,7 +42,7 @@ linter:
-
avoid_bool_literals_in_conditional_expressions
-
avoid_bool_literals_in_conditional_expressions
# - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023
# - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023
# - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/3023
# - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/3023
-
avoid_classes_with_only_static_member
s
# avoid_classes_with_only_static_members # # we do this commonly for `abstract final class`e
s
-
avoid_double_and_int_checks
-
avoid_double_and_int_checks
-
avoid_dynamic_calls
-
avoid_dynamic_calls
-
avoid_empty_else
-
avoid_empty_else
...
...
dev/benchmarks/macrobenchmarks/lib/src/web/bench_mouse_region_grid_hover.dart
View file @
31798757
...
@@ -116,9 +116,7 @@ class BenchMouseRegionGridHover extends WidgetRecorder {
...
@@ -116,9 +116,7 @@ class BenchMouseRegionGridHover extends WidgetRecorder {
}
}
}
}
class
_UntilNextFrame
{
abstract
final
class
_UntilNextFrame
{
_UntilNextFrame
.
_
();
static
Completer
<
void
>?
_completer
;
static
Completer
<
void
>?
_completer
;
static
Future
<
void
>
wait
()
{
static
Future
<
void
>
wait
()
{
...
...
dev/benchmarks/macrobenchmarks/lib/src/web/bench_mouse_region_grid_scroll.dart
View file @
31798757
...
@@ -88,9 +88,7 @@ class BenchMouseRegionGridScroll extends WidgetRecorder {
...
@@ -88,9 +88,7 @@ class BenchMouseRegionGridScroll extends WidgetRecorder {
}
}
}
}
class
_UntilNextFrame
{
abstract
final
class
_UntilNextFrame
{
_UntilNextFrame
.
_
();
static
Completer
<
void
>?
_completer
;
static
Completer
<
void
>?
_completer
;
static
Future
<
void
>
wait
()
{
static
Future
<
void
>
wait
()
{
...
...
dev/integration_tests/flutter_gallery/lib/gallery/icons.dart
View file @
31798757
...
@@ -4,11 +4,7 @@
...
@@ -4,11 +4,7 @@
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
class
GalleryIcons
{
abstract
final
class
GalleryIcons
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
GalleryIcons
.
_
();
static
const
IconData
tooltip
=
IconData
(
0xe900
,
fontFamily:
'GalleryIcons'
);
static
const
IconData
tooltip
=
IconData
(
0xe900
,
fontFamily:
'GalleryIcons'
);
static
const
IconData
text_fields_alt
=
IconData
(
0xe901
,
fontFamily:
'GalleryIcons'
);
static
const
IconData
text_fields_alt
=
IconData
(
0xe901
,
fontFamily:
'GalleryIcons'
);
static
const
IconData
tabs
=
IconData
(
0xe902
,
fontFamily:
'GalleryIcons'
);
static
const
IconData
tabs
=
IconData
(
0xe902
,
fontFamily:
'GalleryIcons'
);
...
...
packages/flutter/lib/src/animation/curves.dart
View file @
31798757
...
@@ -1353,11 +1353,7 @@ class ElasticInOutCurve extends Curve {
...
@@ -1353,11 +1353,7 @@ class ElasticInOutCurve extends Curve {
///
///
/// * [Curve], the interface implemented by the constants available from the
/// * [Curve], the interface implemented by the constants available from the
/// [Curves] class.
/// [Curves] class.
class
Curves
{
abstract
final
class
Curves
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
Curves
.
_
();
/// A linear animation curve.
/// A linear animation curve.
///
///
/// This is the identity map over the unit interval: its [Curve.transform]
/// This is the identity map over the unit interval: its [Curve.transform]
...
...
packages/flutter/lib/src/cupertino/colors.dart
View file @
31798757
...
@@ -37,11 +37,7 @@ import 'theme.dart';
...
@@ -37,11 +37,7 @@ import 'theme.dart';
/// ### Background Colors
/// ### Background Colors
/// 
/// 
///
///
class
CupertinoColors
{
abstract
final
class
CupertinoColors
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
CupertinoColors
.
_
();
/// iOS 13's default blue color. Used to indicate active elements such as
/// iOS 13's default blue color. Used to indicate active elements such as
/// buttons, selected tabs and your own chat bubbles.
/// buttons, selected tabs and your own chat bubbles.
///
///
...
...
packages/flutter/lib/src/cupertino/icons.dart
View file @
31798757
...
@@ -60,11 +60,7 @@ import 'package:flutter/widgets.dart';
...
@@ -60,11 +60,7 @@ import 'package:flutter/widgets.dart';
///
///
/// * [Icon], used to show these icons.
/// * [Icon], used to show these icons.
@staticIconProvider
@staticIconProvider
class
CupertinoIcons
{
abstract
final
class
CupertinoIcons
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
CupertinoIcons
.
_
();
/// The icon font used for Cupertino icons.
/// The icon font used for Cupertino icons.
static
const
String
iconFont
=
'CupertinoIcons'
;
static
const
String
iconFont
=
'CupertinoIcons'
;
...
...
packages/flutter/lib/src/foundation/licenses.dart
View file @
31798757
...
@@ -282,11 +282,7 @@ class LicenseEntryWithLineBreaks extends LicenseEntry {
...
@@ -282,11 +282,7 @@ class LicenseEntryWithLineBreaks extends LicenseEntry {
/// uses this API to select licenses to show.
/// uses this API to select licenses to show.
/// * [AboutListTile], which is a widget that can be added to a [Drawer]. When
/// * [AboutListTile], which is a widget that can be added to a [Drawer]. When
/// tapped it calls [showAboutDialog].
/// tapped it calls [showAboutDialog].
class
LicenseRegistry
{
abstract
final
class
LicenseRegistry
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
LicenseRegistry
.
_
();
static
List
<
LicenseEntryCollector
>?
_collectors
;
static
List
<
LicenseEntryCollector
>?
_collectors
;
/// Adds licenses to the registry.
/// Adds licenses to the registry.
...
...
packages/flutter/lib/src/foundation/unicode.dart
View file @
31798757
...
@@ -10,10 +10,7 @@
...
@@ -10,10 +10,7 @@
///
///
/// * <http://unicode.org/reports/tr9/>, which describes the Unicode
/// * <http://unicode.org/reports/tr9/>, which describes the Unicode
/// bidirectional text algorithm.
/// bidirectional text algorithm.
class
Unicode
{
abstract
final
class
Unicode
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
Unicode
.
_
();
/// `U+202A LEFT-TO-RIGHT EMBEDDING`
/// `U+202A LEFT-TO-RIGHT EMBEDDING`
///
///
/// Treat the following text as embedded left-to-right.
/// Treat the following text as embedded left-to-right.
...
...
packages/flutter/lib/src/gestures/converter.dart
View file @
31798757
...
@@ -37,11 +37,7 @@ int _synthesiseDownButtons(int buttons, PointerDeviceKind kind) {
...
@@ -37,11 +37,7 @@ int _synthesiseDownButtons(int buttons, PointerDeviceKind kind) {
/// This takes [PointerDataPacket] objects, as received from the engine via
/// This takes [PointerDataPacket] objects, as received from the engine via
/// [dart:ui.PlatformDispatcher.onPointerDataPacket], and converts them to
/// [dart:ui.PlatformDispatcher.onPointerDataPacket], and converts them to
/// [PointerEvent] objects.
/// [PointerEvent] objects.
class
PointerEventConverter
{
abstract
final
class
PointerEventConverter
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
PointerEventConverter
.
_
();
/// Expand the given packet of pointer data into a sequence of framework
/// Expand the given packet of pointer data into a sequence of framework
/// pointer events.
/// pointer events.
///
///
...
...
packages/flutter/lib/src/gestures/hit_test.dart
View file @
31798757
...
@@ -15,11 +15,7 @@ export 'package:vector_math/vector_math_64.dart' show Matrix4;
...
@@ -15,11 +15,7 @@ export 'package:vector_math/vector_math_64.dart' show Matrix4;
export
'events.dart'
show
PointerEvent
;
export
'events.dart'
show
PointerEvent
;
/// An object that can hit-test pointers.
/// An object that can hit-test pointers.
abstract
class
HitTestable
{
abstract
interface
class
HitTestable
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
HitTestable
.
_
();
/// Check whether the given position hits this object.
/// Check whether the given position hits this object.
///
///
/// If this given position hits this object, consider adding a [HitTestEntry]
/// If this given position hits this object, consider adding a [HitTestEntry]
...
@@ -28,21 +24,13 @@ abstract class HitTestable {
...
@@ -28,21 +24,13 @@ abstract class HitTestable {
}
}
/// An object that can dispatch events.
/// An object that can dispatch events.
abstract
class
HitTestDispatcher
{
abstract
interface
class
HitTestDispatcher
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
HitTestDispatcher
.
_
();
/// Override this method to dispatch events.
/// Override this method to dispatch events.
void
dispatchEvent
(
PointerEvent
event
,
HitTestResult
result
);
void
dispatchEvent
(
PointerEvent
event
,
HitTestResult
result
);
}
}
/// An object that can handle events.
/// An object that can handle events.
abstract
class
HitTestTarget
{
abstract
interface
class
HitTestTarget
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
HitTestTarget
.
_
();
/// Override this method to receive events.
/// Override this method to receive events.
void
handleEvent
(
PointerEvent
event
,
HitTestEntry
<
HitTestTarget
>
entry
);
void
handleEvent
(
PointerEvent
event
,
HitTestEntry
<
HitTestTarget
>
entry
);
}
}
...
...
packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart
View file @
31798757
...
@@ -24,11 +24,7 @@ part of material_animated_icons; // ignore: use_string_in_part_of_directives
...
@@ -24,11 +24,7 @@ part of material_animated_icons; // ignore: use_string_in_part_of_directives
/// See also:
/// See also:
///
///
/// * [Icons], for the list of available static Material Icons.
/// * [Icons], for the list of available static Material Icons.
abstract
class
AnimatedIcons
{
abstract
final
class
AnimatedIcons
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
AnimatedIcons
.
_
();
/// The Material Design add to event icon animation.
/// The Material Design add to event icon animation.
///
///
/// {@animation 72 72 https://flutter.github.io/assets-for-api-docs/assets/widgets/add_event.mp4}
/// {@animation 72 72 https://flutter.github.io/assets-for-api-docs/assets/widgets/add_event.mp4}
...
...
packages/flutter/lib/src/material/chip.dart
View file @
31798757
...
@@ -62,11 +62,7 @@ const Icon _kDefaultDeleteIcon = Icon(Icons.cancel, size: _kDeleteIconSize);
...
@@ -62,11 +62,7 @@ const Icon _kDefaultDeleteIcon = Icon(Icons.cancel, size: _kDeleteIconSize);
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * [ActionChip], represents an action related to primary content.
/// * [ActionChip], represents an action related to primary content.
/// * <https://material.io/design/components/chips.html>
/// * <https://material.io/design/components/chips.html>
abstract
class
ChipAttributes
{
abstract
interface
class
ChipAttributes
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
ChipAttributes
.
_
();
/// The primary content of the chip.
/// The primary content of the chip.
///
///
/// Typically a [Text] widget.
/// Typically a [Text] widget.
...
@@ -214,11 +210,7 @@ abstract class ChipAttributes {
...
@@ -214,11 +210,7 @@ abstract class ChipAttributes {
/// as an entity (person, place, or thing) or conversational text, in a
/// as an entity (person, place, or thing) or conversational text, in a
/// compact form.
/// compact form.
/// * <https://material.io/design/components/chips.html>
/// * <https://material.io/design/components/chips.html>
abstract
class
DeletableChipAttributes
{
abstract
interface
class
DeletableChipAttributes
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
DeletableChipAttributes
.
_
();
/// The icon displayed when [onDeleted] is set.
/// The icon displayed when [onDeleted] is set.
///
///
/// Defaults to an [Icon] widget set to use [Icons.cancel].
/// Defaults to an [Icon] widget set to use [Icons.cancel].
...
@@ -284,11 +276,7 @@ abstract class DeletableChipAttributes {
...
@@ -284,11 +276,7 @@ abstract class DeletableChipAttributes {
/// compact form.
/// compact form.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * <https://material.io/design/components/chips.html>
/// * <https://material.io/design/components/chips.html>
abstract
class
CheckmarkableChipAttributes
{
abstract
interface
class
CheckmarkableChipAttributes
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
CheckmarkableChipAttributes
.
_
();
/// Whether or not to show a check mark when
/// Whether or not to show a check mark when
/// [SelectableChipAttributes.selected] is true.
/// [SelectableChipAttributes.selected] is true.
///
///
...
@@ -319,11 +307,7 @@ abstract class CheckmarkableChipAttributes {
...
@@ -319,11 +307,7 @@ abstract class CheckmarkableChipAttributes {
/// chips contain related descriptive text or categories.
/// chips contain related descriptive text or categories.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * <https://material.io/design/components/chips.html>
/// * <https://material.io/design/components/chips.html>
abstract
class
SelectableChipAttributes
{
abstract
interface
class
SelectableChipAttributes
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
SelectableChipAttributes
.
_
();
/// Whether or not this chip is selected.
/// Whether or not this chip is selected.
///
///
/// If [onSelected] is not null, this value will be used to determine if the
/// If [onSelected] is not null, this value will be used to determine if the
...
@@ -429,11 +413,7 @@ abstract class SelectableChipAttributes {
...
@@ -429,11 +413,7 @@ abstract class SelectableChipAttributes {
/// chips contain related descriptive text or categories.
/// chips contain related descriptive text or categories.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * <https://material.io/design/components/chips.html>
/// * <https://material.io/design/components/chips.html>
abstract
class
DisabledChipAttributes
{
abstract
interface
class
DisabledChipAttributes
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
DisabledChipAttributes
.
_
();
/// Whether or not this chip is enabled for input.
/// Whether or not this chip is enabled for input.
///
///
/// If this is true, but all of the user action callbacks are null (i.e.
/// If this is true, but all of the user action callbacks are null (i.e.
...
@@ -477,11 +457,7 @@ abstract class DisabledChipAttributes {
...
@@ -477,11 +457,7 @@ abstract class DisabledChipAttributes {
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * [FilterChip], uses tags or descriptive words as a way to filter content.
/// * [ActionChip], represents an action related to primary content.
/// * [ActionChip], represents an action related to primary content.
/// * <https://material.io/design/components/chips.html>
/// * <https://material.io/design/components/chips.html>
abstract
class
TappableChipAttributes
{
abstract
interface
class
TappableChipAttributes
{
// This class is intended to be used as an interface, and should not be
// extended directly; this constructor prevents instantiation and extension.
TappableChipAttributes
.
_
();
/// Called when the user taps the chip.
/// Called when the user taps the chip.
///
///
/// If [onPressed] is set, then this callback will be called when the user
/// If [onPressed] is set, then this callback will be called when the user
...
...
packages/flutter/lib/src/material/colors.dart
View file @
31798757
...
@@ -190,11 +190,7 @@ class MaterialAccentColor extends ColorSwatch<int> {
...
@@ -190,11 +190,7 @@ class MaterialAccentColor extends ColorSwatch<int> {
/// See also:
/// See also:
///
///
/// * Cookbook: [Use themes to share colors and font styles](https://flutter.dev/docs/cookbook/design/themes)
/// * Cookbook: [Use themes to share colors and font styles](https://flutter.dev/docs/cookbook/design/themes)
class
Colors
{
abstract
final
class
Colors
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
Colors
.
_
();
/// Completely invisible.
/// Completely invisible.
static
const
Color
transparent
=
Color
(
0x00000000
);
static
const
Color
transparent
=
Color
(
0x00000000
);
...
...
packages/flutter/lib/src/material/date.dart
View file @
31798757
...
@@ -7,11 +7,7 @@ import 'package:flutter/foundation.dart';
...
@@ -7,11 +7,7 @@ import 'package:flutter/foundation.dart';
import
'material_localizations.dart'
;
import
'material_localizations.dart'
;
/// Utility functions for working with dates.
/// Utility functions for working with dates.
class
DateUtils
{
abstract
final
class
DateUtils
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
DateUtils
.
_
();
/// Returns a [DateTime] with the date of the original, but time set to
/// Returns a [DateTime] with the date of the original, but time set to
/// midnight.
/// midnight.
static
DateTime
dateOnly
(
DateTime
date
)
{
static
DateTime
dateOnly
(
DateTime
date
)
{
...
...
packages/flutter/lib/src/material/elevation_overlay.dart
View file @
31798757
...
@@ -11,11 +11,7 @@ import 'theme.dart';
...
@@ -11,11 +11,7 @@ import 'theme.dart';
/// A utility class for dealing with the overlay color needed
/// A utility class for dealing with the overlay color needed
/// to indicate elevation of surfaces.
/// to indicate elevation of surfaces.
class
ElevationOverlay
{
abstract
final
class
ElevationOverlay
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
ElevationOverlay
.
_
();
/// Applies a surface tint color to a given container color to indicate
/// Applies a surface tint color to a given container color to indicate
/// the level of its elevation.
/// the level of its elevation.
///
///
...
...
packages/flutter/lib/src/material/feedback.dart
View file @
31798757
...
@@ -81,11 +81,7 @@ import 'theme.dart';
...
@@ -81,11 +81,7 @@ import 'theme.dart';
/// }
/// }
/// ```
/// ```
/// {@end-tool}
/// {@end-tool}
class
Feedback
{
abstract
final
class
Feedback
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
Feedback
.
_
();
/// Provides platform-specific feedback for a tap.
/// Provides platform-specific feedback for a tap.
///
///
/// On Android the click system sound is played. On iOS this is a no-op.
/// On Android the click system sound is played. On iOS this is a no-op.
...
...
packages/flutter/lib/src/material/icons.dart
View file @
31798757
...
@@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart';
...
@@ -10,7 +10,7 @@ import 'package:flutter/widgets.dart';
/// A set of platform-adaptive Material Design icons.
/// A set of platform-adaptive Material Design icons.
///
///
/// Use [Icons.adaptive] to access a static instance of this class.
/// Use [Icons.adaptive] to access a static instance of this class.
class PlatformAdaptiveIcons implements Icons {
final
class PlatformAdaptiveIcons implements Icons {
const PlatformAdaptiveIcons._();
const PlatformAdaptiveIcons._();
static bool _isCupertino() {
static bool _isCupertino() {
...
@@ -150,11 +150,7 @@ class PlatformAdaptiveIcons implements Icons {
...
@@ -150,11 +150,7 @@ class PlatformAdaptiveIcons implements Icons {
/// * <https://material.io/resources/icons>
/// * <https://material.io/resources/icons>
/// * [AnimatedIcons], for the list of available animated Material Icons.
/// * [AnimatedIcons], for the list of available animated Material Icons.
@staticIconProvider
@staticIconProvider
class Icons {
abstract final class Icons {
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
Icons._();
/// A set of platform-adaptive Material Design icons.
/// A set of platform-adaptive Material Design icons.
///
///
/// Provides a convenient way to show a certain set of platform-appropriate
/// Provides a convenient way to show a certain set of platform-appropriate
packages/flutter/lib/src/painting/matrix_utils.dart
View file @
31798757
...
@@ -8,11 +8,7 @@ import 'package:vector_math/vector_math_64.dart';
...
@@ -8,11 +8,7 @@ import 'package:vector_math/vector_math_64.dart';
import
'basic_types.dart'
;
import
'basic_types.dart'
;
/// Utility functions for working with matrices.
/// Utility functions for working with matrices.
class
MatrixUtils
{
abstract
final
class
MatrixUtils
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
MatrixUtils
.
_
();
/// Returns the given [transform] matrix as an [Offset], if the matrix is
/// Returns the given [transform] matrix as an [Offset], if the matrix is
/// nothing but a 2D translation.
/// nothing but a 2D translation.
///
///
...
...
packages/flutter/lib/src/rendering/layout_helper.dart
View file @
31798757
...
@@ -17,11 +17,7 @@ typedef ChildLayouter = Size Function(RenderBox child, BoxConstraints constraint
...
@@ -17,11 +17,7 @@ typedef ChildLayouter = Size Function(RenderBox child, BoxConstraints constraint
/// given set of [BoxConstraints].
/// given set of [BoxConstraints].
///
///
/// All of the functions adhere to the [ChildLayouter] signature.
/// All of the functions adhere to the [ChildLayouter] signature.
class
ChildLayoutHelper
{
abstract
final
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
/// Returns the [Size] that the [RenderBox] would have if it were to
/// be laid out with the given [BoxConstraints].
/// be laid out with the given [BoxConstraints].
///
///
...
...
packages/flutter/lib/src/rendering/selection.dart
View file @
31798757
...
@@ -206,9 +206,7 @@ mixin SelectionRegistrant on Selectable {
...
@@ -206,9 +206,7 @@ mixin SelectionRegistrant on Selectable {
}
}
/// A utility class that provides useful methods for handling selection events.
/// A utility class that provides useful methods for handling selection events.
class
SelectionUtils
{
abstract
final
class
SelectionUtils
{
SelectionUtils
.
_
();
/// Determines [SelectionResult] purely based on the target rectangle.
/// Determines [SelectionResult] purely based on the target rectangle.
///
///
/// This method returns [SelectionResult.end] if the `point` is inside the
/// This method returns [SelectionResult.end] if the `point` is inside the
...
...
packages/flutter/lib/src/rendering/viewport.dart
View file @
31798757
...
@@ -29,11 +29,7 @@ enum CacheExtentStyle {
...
@@ -29,11 +29,7 @@ enum CacheExtentStyle {
/// content, which can be controlled by a [ViewportOffset]. This interface lets
/// content, which can be controlled by a [ViewportOffset]. This interface lets
/// the framework recognize such render objects and interact with them without
/// the framework recognize such render objects and interact with them without
/// having specific knowledge of all the various types of viewports.
/// having specific knowledge of all the various types of viewports.
abstract
class
RenderAbstractViewport
extends
RenderObject
{
abstract
interface
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.
RenderAbstractViewport
.
_
();
/// Returns the [RenderAbstractViewport] that most tightly encloses the given
/// Returns the [RenderAbstractViewport] that most tightly encloses the given
/// render object.
/// render object.
///
///
...
...
packages/flutter/lib/src/semantics/semantics_service.dart
View file @
31798757
...
@@ -17,11 +17,7 @@ export 'dart:ui' show TextDirection;
...
@@ -17,11 +17,7 @@ export 'dart:ui' show TextDirection;
///
///
/// When possible, prefer using mechanisms like [Semantics] to implicitly
/// When possible, prefer using mechanisms like [Semantics] to implicitly
/// trigger announcements over using this event.
/// trigger announcements over using this event.
class
SemanticsService
{
abstract
final
class
SemanticsService
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
SemanticsService
.
_
();
/// Sends a semantic announcement.
/// Sends a semantic announcement.
///
///
/// This should be used for announcement that are not seamlessly announced by
/// This should be used for announcement that are not seamlessly announced by
...
...
packages/flutter/lib/src/services/clipboard.dart
View file @
31798757
...
@@ -21,11 +21,7 @@ class ClipboardData {
...
@@ -21,11 +21,7 @@ class ClipboardData {
}
}
/// Utility methods for interacting with the system's clipboard.
/// Utility methods for interacting with the system's clipboard.
class
Clipboard
{
abstract
final
class
Clipboard
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
Clipboard
.
_
();
// Constants for common [getData] [format] types.
// Constants for common [getData] [format] types.
/// Plain text data format string.
/// Plain text data format string.
...
...
packages/flutter/lib/src/services/deferred_component.dart
View file @
31798757
...
@@ -24,11 +24,7 @@ import 'system_channels.dart';
...
@@ -24,11 +24,7 @@ import 'system_channels.dart';
/// Deferred components are currently an Android-only feature. The methods in
/// Deferred components are currently an Android-only feature. The methods in
/// this class are a no-op and all assets and dart code are already available
/// this class are a no-op and all assets and dart code are already available
/// without installation if called on other platforms.
/// without installation if called on other platforms.
class
DeferredComponent
{
abstract
final
class
DeferredComponent
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
DeferredComponent
.
_
();
// TODO(garyq): We should eventually expand this to install components by loadingUnitId
// TODO(garyq): We should eventually expand this to install components by loadingUnitId
// as well as componentName, but currently, loadingUnitId is opaque to the dart code
// as well as componentName, but currently, loadingUnitId is opaque to the dart code
// so this is not possible. The API has been left flexible to allow adding
// so this is not possible. The API has been left flexible to allow adding
...
...
packages/flutter/lib/src/services/haptic_feedback.dart
View file @
31798757
...
@@ -9,11 +9,7 @@ import 'system_channels.dart';
...
@@ -9,11 +9,7 @@ import 'system_channels.dart';
///
///
/// This API is intentionally terse since it calls default platform behavior. It
/// This API is intentionally terse since it calls default platform behavior. It
/// is not suitable for precise control of the system's haptic feedback module.
/// is not suitable for precise control of the system's haptic feedback module.
class
HapticFeedback
{
abstract
final
class
HapticFeedback
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
HapticFeedback
.
_
();
/// Provides vibration haptic feedback to the user for a short duration.
/// Provides vibration haptic feedback to the user for a short duration.
///
///
/// On iOS devices that support haptic feedback, this uses the default system
/// On iOS devices that support haptic feedback, this uses the default system
...
...
packages/flutter/lib/src/services/platform_channel.dart
View file @
31798757
...
@@ -340,10 +340,7 @@ class MethodChannel {
...
@@ -340,10 +340,7 @@ class MethodChannel {
/// <https://flutter.dev/developing-packages/>:
/// <https://flutter.dev/developing-packages/>:
///
///
/// ```dart
/// ```dart
/// class Music {
/// abstract final class Music {
/// // Class cannot be instantiated.
/// const Music._();
///
/// static const MethodChannel _channel = MethodChannel('music');
/// static const MethodChannel _channel = MethodChannel('music');
///
///
/// static Future<bool> isLicensed() async {
/// static Future<bool> isLicensed() async {
...
...
packages/flutter/lib/src/services/system_channels.dart
View file @
31798757
...
@@ -10,11 +10,7 @@ import 'platform_channel.dart';
...
@@ -10,11 +10,7 @@ import 'platform_channel.dart';
export
'platform_channel.dart'
show
BasicMessageChannel
,
MethodChannel
;
export
'platform_channel.dart'
show
BasicMessageChannel
,
MethodChannel
;
/// Platform channels used by the Flutter system.
/// Platform channels used by the Flutter system.
class
SystemChannels
{
abstract
final
class
SystemChannels
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
SystemChannels
.
_
();
/// A JSON [MethodChannel] for navigation.
/// A JSON [MethodChannel] for navigation.
///
///
/// The following incoming methods are defined for this channel (registered
/// The following incoming methods are defined for this channel (registered
...
...
packages/flutter/lib/src/services/system_chrome.dart
View file @
31798757
...
@@ -358,11 +358,7 @@ List<String> _stringify(List<dynamic> list) => <String>[
...
@@ -358,11 +358,7 @@ List<String> _stringify(List<dynamic> list) => <String>[
/// Controls specific aspects of the operating system's graphical interface and
/// Controls specific aspects of the operating system's graphical interface and
/// how it interacts with the application.
/// how it interacts with the application.
class
SystemChrome
{
abstract
final
class
SystemChrome
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
SystemChrome
.
_
();
/// Specifies the set of orientations the application interface can
/// Specifies the set of orientations the application interface can
/// be displayed in.
/// be displayed in.
///
///
...
...
packages/flutter/lib/src/services/system_navigator.dart
View file @
31798757
...
@@ -5,11 +5,7 @@
...
@@ -5,11 +5,7 @@
import
'system_channels.dart'
;
import
'system_channels.dart'
;
/// Controls specific aspects of the system navigation stack.
/// Controls specific aspects of the system navigation stack.
class
SystemNavigator
{
abstract
final
class
SystemNavigator
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
SystemNavigator
.
_
();
/// Removes the topmost Flutter instance, presenting what was before
/// Removes the topmost Flutter instance, presenting what was before
/// it.
/// it.
///
///
...
...
packages/flutter/lib/src/services/system_sound.dart
View file @
31798757
...
@@ -26,11 +26,7 @@ enum SystemSoundType {
...
@@ -26,11 +26,7 @@ enum SystemSoundType {
/// Provides access to the library of short system specific sounds for common
/// Provides access to the library of short system specific sounds for common
/// tasks.
/// tasks.
class
SystemSound
{
abstract
final
class
SystemSound
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
SystemSound
.
_
();
/// Play the specified system sound. If that sound is not present on the
/// Play the specified system sound. If that sound is not present on the
/// system, the call is ignored.
/// system, the call is ignored.
///
///
...
...
packages/flutter/lib/src/widgets/window.dart
View file @
31798757
...
@@ -3,6 +3,4 @@
...
@@ -3,6 +3,4 @@
// found in the LICENSE file.
// found in the LICENSE file.
/// Placeholder to be used in a future version of Flutter.
/// Placeholder to be used in a future version of Flutter.
abstract
class
Window
{
abstract
final
class
Window
{
}
const
Window
.
_
();
}
packages/flutter_driver/lib/src/common/fuchsia_compat.dart
View file @
31798757
...
@@ -79,11 +79,7 @@ Future<PortForwarder> _dummyPortForwardingFunction(
...
@@ -79,11 +79,7 @@ Future<PortForwarder> _dummyPortForwardingFunction(
/// [FuchsiaRemoteConnection.connect] whereby the `FUCHSIA_REMOTE_URL` and
/// [FuchsiaRemoteConnection.connect] whereby the `FUCHSIA_REMOTE_URL` and
/// `FUCHSIA_SSH_CONFIG` variables must be set. If run on a Fuchsia device, will
/// `FUCHSIA_SSH_CONFIG` variables must be set. If run on a Fuchsia device, will
/// connect locally without need for environment variables.
/// connect locally without need for environment variables.
class
FuchsiaCompat
{
abstract
final
class
FuchsiaCompat
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
FuchsiaCompat
.
_
();
static
void
_init
()
{
static
void
_init
()
{
fuchsiaPortForwardingFunction
=
_dummyPortForwardingFunction
;
fuchsiaPortForwardingFunction
=
_dummyPortForwardingFunction
;
}
}
...
...
packages/flutter_test/lib/src/event_simulation.dart
View file @
31798757
...
@@ -38,11 +38,7 @@ String? _keyLabel(LogicalKeyboardKey key) {
...
@@ -38,11 +38,7 @@ String? _keyLabel(LogicalKeyboardKey key) {
/// A class that serves as a namespace for a bunch of keyboard-key generation
/// A class that serves as a namespace for a bunch of keyboard-key generation
/// utilities.
/// utilities.
class
KeyEventSimulator
{
abstract
final
class
KeyEventSimulator
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
KeyEventSimulator
.
_
();
// Look up a synonym key, and just return the left version of it.
// Look up a synonym key, and just return the left version of it.
static
LogicalKeyboardKey
_getKeySynonym
(
LogicalKeyboardKey
origKey
)
{
static
LogicalKeyboardKey
_getKeySynonym
(
LogicalKeyboardKey
origKey
)
{
if
(
origKey
==
LogicalKeyboardKey
.
shift
)
{
if
(
origKey
==
LogicalKeyboardKey
.
shift
)
{
...
...
packages/flutter_test/lib/src/test_async_utils.dart
View file @
31798757
...
@@ -44,10 +44,7 @@ class _AsyncScope {
...
@@ -44,10 +44,7 @@ class _AsyncScope {
/// // ...
/// // ...
/// });
/// });
/// ```
/// ```
class
TestAsyncUtils
{
abstract
final
class
TestAsyncUtils
{
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
TestAsyncUtils
.
_
();
static
const
String
_className
=
'TestAsyncUtils'
;
static
const
String
_className
=
'TestAsyncUtils'
;
static
final
List
<
_AsyncScope
>
_scopeStack
=
<
_AsyncScope
>[];
static
final
List
<
_AsyncScope
>
_scopeStack
=
<
_AsyncScope
>[];
...
...
packages/flutter_tools/lib/src/build_system/targets/common.dart
View file @
31798757
...
@@ -394,10 +394,7 @@ abstract class CopyFlutterAotBundle extends Target {
...
@@ -394,10 +394,7 @@ abstract class CopyFlutterAotBundle extends Target {
}
}
/// Lipo CLI tool wrapper shared by iOS and macOS builds.
/// Lipo CLI tool wrapper shared by iOS and macOS builds.
class
Lipo
{
abstract
final
class
Lipo
{
/// Static only.
Lipo
.
_
();
/// Create a "fat" binary by combining multiple architecture-specific ones.
/// Create a "fat" binary by combining multiple architecture-specific ones.
/// `skipMissingInputs` can be changed to `true` to first check whether
/// `skipMissingInputs` can be changed to `true` to first check whether
/// the expected input paths exist and ignore the command if they don't.
/// the expected input paths exist and ignore the command if they don't.
...
...
packages/flutter_tools/test/integration.shard/test_utils.dart
View file @
31798757
...
@@ -100,10 +100,7 @@ Future<void> pollForServiceExtensionValue<T>({
...
@@ -100,10 +100,7 @@ Future<void> pollForServiceExtensionValue<T>({
);
);
}
}
class
AppleTestUtils
{
abstract
final
class
AppleTestUtils
{
// static only
AppleTestUtils
.
_
();
static
const
List
<
String
>
requiredSymbols
=
<
String
>[
static
const
List
<
String
>
requiredSymbols
=
<
String
>[
'_kDartIsolateSnapshotData'
,
'_kDartIsolateSnapshotData'
,
'_kDartIsolateSnapshotInstructions'
,
'_kDartIsolateSnapshotInstructions'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment