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
efbde443
Unverified
Commit
efbde443
authored
Mar 18, 2021
by
Michael Goderbauer
Committed by
GitHub
Mar 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up ignores that are not ignoring anything (#78484)
parent
51dbc768
Changes
46
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
50 additions
and
106 deletions
+50
-106
curves.dart
packages/flutter/lib/src/animation/curves.dart
+0
-1
colors.dart
packages/flutter/lib/src/cupertino/colors.dart
+0
-1
icons.dart
packages/flutter/lib/src/cupertino/icons.dart
+0
-1
route.dart
packages/flutter/lib/src/cupertino/route.dart
+1
-4
text_selection_toolbar.dart
...ges/flutter/lib/src/cupertino/text_selection_toolbar.dart
+1
-2
isolates.dart
packages/flutter/lib/src/foundation/isolates.dart
+1
-3
licenses.dart
packages/flutter/lib/src/foundation/licenses.dart
+0
-1
unicode.dart
packages/flutter/lib/src/foundation/unicode.dart
+0
-1
converter.dart
packages/flutter/lib/src/gestures/converter.dart
+0
-1
chip.dart
packages/flutter/lib/src/material/chip.dart
+0
-6
colors.dart
packages/flutter/lib/src/material/colors.dart
+0
-1
elevation_overlay.dart
packages/flutter/lib/src/material/elevation_overlay.dart
+0
-1
feedback.dart
packages/flutter/lib/src/material/feedback.dart
+0
-1
icons.dart
packages/flutter/lib/src/material/icons.dart
+0
-1
refresh_indicator.dart
packages/flutter/lib/src/material/refresh_indicator.dart
+1
-4
_network_image_web.dart
packages/flutter/lib/src/painting/_network_image_web.dart
+1
-1
image_provider.dart
packages/flutter/lib/src/painting/image_provider.dart
+1
-4
matrix_utils.dart
packages/flutter/lib/src/painting/matrix_utils.dart
+0
-1
text_span.dart
packages/flutter/lib/src/painting/text_span.dart
+2
-5
box.dart
packages/flutter/lib/src/rendering/box.dart
+4
-16
custom_layout.dart
packages/flutter/lib/src/rendering/custom_layout.dart
+1
-4
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+1
-4
viewport.dart
packages/flutter/lib/src/rendering/viewport.dart
+0
-1
semantics_service.dart
packages/flutter/lib/src/semantics/semantics_service.dart
+0
-1
asset_bundle.dart
packages/flutter/lib/src/services/asset_bundle.dart
+1
-4
clipboard.dart
packages/flutter/lib/src/services/clipboard.dart
+0
-1
haptic_feedback.dart
packages/flutter/lib/src/services/haptic_feedback.dart
+0
-1
system_channels.dart
packages/flutter/lib/src/services/system_channels.dart
+0
-1
system_chrome.dart
packages/flutter/lib/src/services/system_chrome.dart
+0
-1
system_navigator.dart
packages/flutter/lib/src/services/system_navigator.dart
+0
-1
system_sound.dart
packages/flutter/lib/src/services/system_sound.dart
+0
-1
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+1
-1
navigator.dart
packages/flutter/lib/src/widgets/navigator.dart
+1
-1
scroll_view.dart
packages/flutter/lib/src/widgets/scroll_view.dart
+1
-1
elevated_button_test.dart
packages/flutter/test/material/elevated_button_test.dart
+7
-5
outlined_button_test.dart
packages/flutter/test/material/outlined_button_test.dart
+7
-5
text_button_test.dart
packages/flutter/test/material/text_button_test.dart
+7
-4
time_picker_test.dart
packages/flutter/test/material/time_picker_test.dart
+2
-2
will_pop_test.dart
packages/flutter/test/material/will_pop_test.dart
+1
-1
mocks_for_image_cache.dart
packages/flutter/test/painting/mocks_for_image_cache.dart
+0
-1
system_fonts_test.dart
packages/flutter/test/painting/system_fonts_test.dart
+3
-3
text_input_test.dart
packages/flutter/test/services/text_input_test.dart
+1
-1
gesture_detector_test.dart
packages/flutter/test/widgets/gesture_detector_test.dart
+1
-1
localizations_test.dart
packages/flutter/test/widgets/localizations_test.dart
+1
-1
overlay_test.dart
packages/flutter/test/widgets/overlay_test.dart
+0
-1
single_child_scroll_view_test.dart
...s/flutter/test/widgets/single_child_scroll_view_test.dart
+2
-2
No files found.
packages/flutter/lib/src/animation/curves.dart
View file @
efbde443
...
@@ -1304,7 +1304,6 @@ class ElasticInOutCurve extends Curve {
...
@@ -1304,7 +1304,6 @@ class ElasticInOutCurve extends Curve {
class
Curves
{
class
Curves
{
// This class is not meant to be instatiated or extended; this constructor
// This class is not meant to be instatiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
Curves
.
_
();
Curves
.
_
();
/// A linear animation curve.
/// A linear animation curve.
...
...
packages/flutter/lib/src/cupertino/colors.dart
View file @
efbde443
...
@@ -20,7 +20,6 @@ import 'theme.dart';
...
@@ -20,7 +20,6 @@ import 'theme.dart';
class
CupertinoColors
{
class
CupertinoColors
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
CupertinoColors
.
_
();
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
...
...
packages/flutter/lib/src/cupertino/icons.dart
View file @
efbde443
...
@@ -33,7 +33,6 @@ import 'package:flutter/widgets.dart';
...
@@ -33,7 +33,6 @@ import 'package:flutter/widgets.dart';
class
CupertinoIcons
{
class
CupertinoIcons
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
CupertinoIcons
.
_
();
CupertinoIcons
.
_
();
/// The icon font used for Cupertino icons.
/// The icon font used for Cupertino icons.
...
...
packages/flutter/lib/src/cupertino/route.dart
View file @
efbde443
...
@@ -211,10 +211,7 @@ mixin CupertinoRouteTransitionMixin<T> on PageRoute<T> {
...
@@ -211,10 +211,7 @@ mixin CupertinoRouteTransitionMixin<T> on PageRoute<T> {
child:
child
,
child:
child
,
);
);
assert
(()
{
assert
(()
{
// `child` has a non-nullable return type, but might be null when
if
(
child
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
child
==
null
)
{
// ignore: dead_code
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
ErrorSummary
(
'The builder for route "
${settings.name}
" returned null.'
),
ErrorSummary
(
'The builder for route "
${settings.name}
" returned null.'
),
ErrorDescription
(
'Route builders must never return null.'
),
ErrorDescription
(
'Route builders must never return null.'
),
...
...
packages/flutter/lib/src/cupertino/text_selection_toolbar.dart
View file @
efbde443
...
@@ -358,8 +358,7 @@ class _CupertinoTextSelectionToolbarContent extends StatefulWidget {
...
@@ -358,8 +358,7 @@ class _CupertinoTextSelectionToolbarContent extends StatefulWidget {
required
this
.
toolbarBuilder
,
required
this
.
toolbarBuilder
,
required
this
.
children
,
required
this
.
children
,
})
:
assert
(
children
!=
null
),
})
:
assert
(
children
!=
null
),
// This ignore is used because .isNotEmpty isn't compatible with const.
assert
(
children
.
length
>
0
),
assert
(
children
.
length
>
0
),
// ignore: prefer_is_empty
super
(
key:
key
);
super
(
key:
key
);
final
Offset
anchor
;
final
Offset
anchor
;
...
...
packages/flutter/lib/src/foundation/isolates.dart
View file @
efbde443
...
@@ -44,6 +44,4 @@ typedef _ComputeImpl = Future<R> Function<Q, R>(ComputeCallback<Q, R> callback,
...
@@ -44,6 +44,4 @@ typedef _ComputeImpl = Future<R> Function<Q, R>(ComputeCallback<Q, R> callback,
///
///
/// The `debugLabel` argument can be specified to provide a name to add to the
/// The `debugLabel` argument can be specified to provide a name to add to the
/// [Timeline]. This is useful when profiling an application.
/// [Timeline]. This is useful when profiling an application.
// Remove when https://github.com/dart-lang/sdk/issues/37149 is fixed.
const
_ComputeImpl
compute
=
_isolates
.
compute
;
// ignore: prefer_const_declarations
final
_ComputeImpl
compute
=
_isolates
.
compute
;
packages/flutter/lib/src/foundation/licenses.dart
View file @
efbde443
...
@@ -288,7 +288,6 @@ class LicenseEntryWithLineBreaks extends LicenseEntry {
...
@@ -288,7 +288,6 @@ class LicenseEntryWithLineBreaks extends LicenseEntry {
class
LicenseRegistry
{
class
LicenseRegistry
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
LicenseRegistry
.
_
();
LicenseRegistry
.
_
();
static
List
<
LicenseEntryCollector
>?
_collectors
;
static
List
<
LicenseEntryCollector
>?
_collectors
;
...
...
packages/flutter/lib/src/foundation/unicode.dart
View file @
efbde443
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
class
Unicode
{
class
Unicode
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
Unicode
.
_
();
Unicode
.
_
();
/// `U+202A LEFT-TO-RIGHT EMBEDDING`
/// `U+202A LEFT-TO-RIGHT EMBEDDING`
///
///
...
...
packages/flutter/lib/src/gestures/converter.dart
View file @
efbde443
...
@@ -35,7 +35,6 @@ int _synthesiseDownButtons(int buttons, PointerDeviceKind kind) {
...
@@ -35,7 +35,6 @@ int _synthesiseDownButtons(int buttons, PointerDeviceKind kind) {
class
PointerEventConverter
{
class
PointerEventConverter
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
PointerEventConverter
.
_
();
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
...
...
packages/flutter/lib/src/material/chip.dart
View file @
efbde443
...
@@ -62,7 +62,6 @@ const Icon _kDefaultDeleteIcon = Icon(Icons.cancel, size: _kDeleteIconSize);
...
@@ -62,7 +62,6 @@ const Icon _kDefaultDeleteIcon = Icon(Icons.cancel, size: _kDeleteIconSize);
abstract
class
ChipAttributes
{
abstract
class
ChipAttributes
{
// 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.
// ignore: unused_element
ChipAttributes
.
_
();
ChipAttributes
.
_
();
/// The primary content of the chip.
/// The primary content of the chip.
...
@@ -203,7 +202,6 @@ abstract class ChipAttributes {
...
@@ -203,7 +202,6 @@ abstract class ChipAttributes {
abstract
class
DeletableChipAttributes
{
abstract
class
DeletableChipAttributes
{
// 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.
// ignore: unused_element
DeletableChipAttributes
.
_
();
DeletableChipAttributes
.
_
();
/// The icon displayed when [onDeleted] is set.
/// The icon displayed when [onDeleted] is set.
...
@@ -315,7 +313,6 @@ abstract class DeletableChipAttributes {
...
@@ -315,7 +313,6 @@ abstract class DeletableChipAttributes {
abstract
class
CheckmarkableChipAttributes
{
abstract
class
CheckmarkableChipAttributes
{
// 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.
// ignore: unused_element
CheckmarkableChipAttributes
.
_
();
CheckmarkableChipAttributes
.
_
();
/// Whether or not to show a check mark when
/// Whether or not to show a check mark when
...
@@ -351,7 +348,6 @@ abstract class CheckmarkableChipAttributes {
...
@@ -351,7 +348,6 @@ abstract class CheckmarkableChipAttributes {
abstract
class
SelectableChipAttributes
{
abstract
class
SelectableChipAttributes
{
// 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.
// ignore: unused_element
SelectableChipAttributes
.
_
();
SelectableChipAttributes
.
_
();
/// Whether or not this chip is selected.
/// Whether or not this chip is selected.
...
@@ -462,7 +458,6 @@ abstract class SelectableChipAttributes {
...
@@ -462,7 +458,6 @@ abstract class SelectableChipAttributes {
abstract
class
DisabledChipAttributes
{
abstract
class
DisabledChipAttributes
{
// 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.
// ignore: unused_element
DisabledChipAttributes
.
_
();
DisabledChipAttributes
.
_
();
/// Whether or not this chip is enabled for input.
/// Whether or not this chip is enabled for input.
...
@@ -510,7 +505,6 @@ abstract class DisabledChipAttributes {
...
@@ -510,7 +505,6 @@ abstract class DisabledChipAttributes {
abstract
class
TappableChipAttributes
{
abstract
class
TappableChipAttributes
{
// 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.
// ignore: unused_element
TappableChipAttributes
.
_
();
TappableChipAttributes
.
_
();
/// Called when the user taps the chip.
/// Called when the user taps the chip.
...
...
packages/flutter/lib/src/material/colors.dart
View file @
efbde443
...
@@ -196,7 +196,6 @@ class MaterialAccentColor extends ColorSwatch<int> {
...
@@ -196,7 +196,6 @@ class MaterialAccentColor extends ColorSwatch<int> {
class
Colors
{
class
Colors
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
Colors
.
_
();
Colors
.
_
();
/// Completely invisible.
/// Completely invisible.
...
...
packages/flutter/lib/src/material/elevation_overlay.dart
View file @
efbde443
...
@@ -13,7 +13,6 @@ import 'theme.dart';
...
@@ -13,7 +13,6 @@ import 'theme.dart';
class
ElevationOverlay
{
class
ElevationOverlay
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
ElevationOverlay
.
_
();
ElevationOverlay
.
_
();
/// Applies an overlay color to a surface color to indicate
/// Applies an overlay color to a surface color to indicate
...
...
packages/flutter/lib/src/material/feedback.dart
View file @
efbde443
...
@@ -84,7 +84,6 @@ import 'theme.dart';
...
@@ -84,7 +84,6 @@ import 'theme.dart';
class
Feedback
{
class
Feedback
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
Feedback
.
_
();
Feedback
.
_
();
/// Provides platform-specific feedback for a tap.
/// Provides platform-specific feedback for a tap.
...
...
packages/flutter/lib/src/material/icons.dart
View file @
efbde443
...
@@ -134,7 +134,6 @@ class _PlatformAdaptiveIcons {
...
@@ -134,7 +134,6 @@ class _PlatformAdaptiveIcons {
class Icons {
class Icons {
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
Icons._();
Icons._();
/// A set of platform-adaptive material design icons.
/// A set of platform-adaptive material design icons.
packages/flutter/lib/src/material/refresh_indicator.dart
View file @
efbde443
...
@@ -434,10 +434,7 @@ class RefreshIndicatorState extends State<RefreshIndicator> with TickerProviderS
...
@@ -434,10 +434,7 @@ class RefreshIndicatorState extends State<RefreshIndicator> with TickerProviderS
));
));
return
true
;
return
true
;
}());
}());
// `refreshResult` has a non-nullable type, but might be null when
if
(
refreshResult
==
null
)
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
refreshResult
==
null
)
// ignore: dead_code
return
;
return
;
refreshResult
.
whenComplete
(()
{
refreshResult
.
whenComplete
(()
{
if
(
mounted
&&
_mode
==
_RefreshIndicatorMode
.
refresh
)
{
if
(
mounted
&&
_mode
==
_RefreshIndicatorMode
.
refresh
)
{
...
...
packages/flutter/lib/src/painting/_network_image_web.dart
View file @
efbde443
...
@@ -92,7 +92,7 @@ class NetworkImage
...
@@ -92,7 +92,7 @@ class NetworkImage
chunkCallback:
(
int
bytes
,
int
total
)
{
chunkCallback:
(
int
bytes
,
int
total
)
{
chunkEvents
.
add
(
ImageChunkEvent
(
chunkEvents
.
add
(
ImageChunkEvent
(
cumulativeBytesLoaded:
bytes
,
expectedTotalBytes:
total
));
cumulativeBytesLoaded:
bytes
,
expectedTotalBytes:
total
));
})
as
Future
<
ui
.
Codec
>;
// ignore: undefined_function
})
as
Future
<
ui
.
Codec
>;
}
}
@override
@override
...
...
packages/flutter/lib/src/painting/image_provider.dart
View file @
efbde443
...
@@ -674,10 +674,7 @@ abstract class AssetBundleImageProvider extends ImageProvider<AssetBundleImageKe
...
@@ -674,10 +674,7 @@ abstract class AssetBundleImageProvider extends ImageProvider<AssetBundleImageKe
PaintingBinding
.
instance
!.
imageCache
!.
evict
(
key
);
PaintingBinding
.
instance
!.
imageCache
!.
evict
(
key
);
rethrow
;
rethrow
;
}
}
// `key.bundle.load` has a non-nullable return type, but might be null when
if
(
data
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
data
==
null
)
{
// ignore: dead_code
PaintingBinding
.
instance
!.
imageCache
!.
evict
(
key
);
PaintingBinding
.
instance
!.
imageCache
!.
evict
(
key
);
throw
StateError
(
'Unable to read data'
);
throw
StateError
(
'Unable to read data'
);
}
}
...
...
packages/flutter/lib/src/painting/matrix_utils.dart
View file @
efbde443
...
@@ -14,7 +14,6 @@ import 'basic_types.dart';
...
@@ -14,7 +14,6 @@ import 'basic_types.dart';
class
MatrixUtils
{
class
MatrixUtils
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
MatrixUtils
.
_
();
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
...
...
packages/flutter/lib/src/painting/text_span.dart
View file @
efbde443
...
@@ -343,10 +343,7 @@ class TextSpan extends InlineSpan {
...
@@ -343,10 +343,7 @@ class TextSpan extends InlineSpan {
assert
(()
{
assert
(()
{
if
(
children
!=
null
)
{
if
(
children
!=
null
)
{
for
(
final
InlineSpan
child
in
children
!)
{
for
(
final
InlineSpan
child
in
children
!)
{
// `child` has a non-nullable return type, but might be null when
if
(
child
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
child
==
null
)
{
// ignore: dead_code
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
ErrorSummary
(
'TextSpan contains a null child.'
),
ErrorSummary
(
'TextSpan contains a null child.'
),
ErrorDescription
(
ErrorDescription
(
...
@@ -459,7 +456,7 @@ class TextSpan extends InlineSpan {
...
@@ -459,7 +456,7 @@ class TextSpan extends InlineSpan {
// warning that the null-handling logic is dead code).
// warning that the null-handling logic is dead code).
if
(
child
!=
null
)
{
if
(
child
!=
null
)
{
return
child
.
toDiagnosticsNode
();
return
child
.
toDiagnosticsNode
();
}
else
{
// ignore: dead_code
}
else
{
return
DiagnosticsNode
.
message
(
'<null child>'
);
return
DiagnosticsNode
.
message
(
'<null child>'
);
}
}
}).
toList
();
}).
toList
();
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
efbde443
...
@@ -1398,10 +1398,7 @@ abstract class RenderBox extends RenderObject {
...
@@ -1398,10 +1398,7 @@ abstract class RenderBox extends RenderObject {
@mustCallSuper
@mustCallSuper
double
getMinIntrinsicWidth
(
double
height
)
{
double
getMinIntrinsicWidth
(
double
height
)
{
assert
(()
{
assert
(()
{
// `height` has a non-nullable return type, but might be null when
if
(
height
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
height
==
null
)
{
// ignore: dead_code
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
ErrorSummary
(
'The height argument to getMinIntrinsicWidth was null.'
),
ErrorSummary
(
'The height argument to getMinIntrinsicWidth was null.'
),
ErrorDescription
(
'The argument to getMinIntrinsicWidth must not be negative or null.'
),
ErrorDescription
(
'The argument to getMinIntrinsicWidth must not be negative or null.'
),
...
@@ -1550,10 +1547,7 @@ abstract class RenderBox extends RenderObject {
...
@@ -1550,10 +1547,7 @@ abstract class RenderBox extends RenderObject {
@mustCallSuper
@mustCallSuper
double
getMaxIntrinsicWidth
(
double
height
)
{
double
getMaxIntrinsicWidth
(
double
height
)
{
assert
(()
{
assert
(()
{
// `height` has a non-nullable return type, but might be null when
if
(
height
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
height
==
null
)
{
// ignore: dead_code
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
ErrorSummary
(
'The height argument to getMaxIntrinsicWidth was null.'
),
ErrorSummary
(
'The height argument to getMaxIntrinsicWidth was null.'
),
ErrorDescription
(
'The argument to getMaxIntrinsicWidth must not be negative or null.'
),
ErrorDescription
(
'The argument to getMaxIntrinsicWidth must not be negative or null.'
),
...
@@ -1636,10 +1630,7 @@ abstract class RenderBox extends RenderObject {
...
@@ -1636,10 +1630,7 @@ abstract class RenderBox extends RenderObject {
@mustCallSuper
@mustCallSuper
double
getMinIntrinsicHeight
(
double
width
)
{
double
getMinIntrinsicHeight
(
double
width
)
{
assert
(()
{
assert
(()
{
// `width` has a non-nullable return type, but might be null when
if
(
width
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
width
==
null
)
{
// ignore: dead_code
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
ErrorSummary
(
'The width argument to getMinIntrinsicHeight was null.'
),
ErrorSummary
(
'The width argument to getMinIntrinsicHeight was null.'
),
ErrorDescription
(
'The argument to getMinIntrinsicHeight must not be negative or null.'
),
ErrorDescription
(
'The argument to getMinIntrinsicHeight must not be negative or null.'
),
...
@@ -1721,10 +1712,7 @@ abstract class RenderBox extends RenderObject {
...
@@ -1721,10 +1712,7 @@ abstract class RenderBox extends RenderObject {
@mustCallSuper
@mustCallSuper
double
getMaxIntrinsicHeight
(
double
width
)
{
double
getMaxIntrinsicHeight
(
double
width
)
{
assert
(()
{
assert
(()
{
// `width` has a non-nullable return type, but might be null when
if
(
width
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
width
==
null
)
{
// ignore: dead_code
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
ErrorSummary
(
'The width argument to getMaxIntrinsicHeight was null.'
),
ErrorSummary
(
'The width argument to getMaxIntrinsicHeight was null.'
),
ErrorDescription
(
'The argument to getMaxIntrinsicHeight must not be negative or null.'
),
ErrorDescription
(
'The argument to getMaxIntrinsicHeight must not be negative or null.'
),
...
...
packages/flutter/lib/src/rendering/custom_layout.dart
View file @
efbde443
...
@@ -187,10 +187,7 @@ abstract class MultiChildLayoutDelegate {
...
@@ -187,10 +187,7 @@ abstract class MultiChildLayoutDelegate {
'There is no child with the id "
$childId
".'
'There is no child with the id "
$childId
".'
);
);
}
}
// `offset` has a non-nullable return type, but might be null when
if
(
offset
==
null
)
{
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
if
(
offset
==
null
)
{
// ignore: dead_code
throw
FlutterError
(
throw
FlutterError
(
'The
$this
custom multichild layout delegate provided a null position for the child with id "
$childId
".'
'The
$this
custom multichild layout delegate provided a null position for the child with id "
$childId
".'
);
);
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
efbde443
...
@@ -1499,10 +1499,7 @@ class RenderClipRRect extends _RenderCustomClip<RRect> {
...
@@ -1499,10 +1499,7 @@ class RenderClipRRect extends _RenderCustomClip<RRect> {
assert
(
clipBehavior
!=
Clip
.
none
),
assert
(
clipBehavior
!=
Clip
.
none
),
_borderRadius
=
borderRadius
,
_borderRadius
=
borderRadius
,
super
(
child:
child
,
clipper:
clipper
,
clipBehavior:
clipBehavior
)
{
super
(
child:
child
,
clipper:
clipper
,
clipBehavior:
clipBehavior
)
{
// `_borderRadius` has a non-nullable return type, but might be null when
assert
(
_borderRadius
!=
null
||
clipper
!=
null
);
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
assert
(
_borderRadius
!=
null
||
clipper
!=
null
);
// ignore: dead_code
}
}
/// The border radius of the rounded corners.
/// The border radius of the rounded corners.
...
...
packages/flutter/lib/src/rendering/viewport.dart
View file @
efbde443
...
@@ -32,7 +32,6 @@ enum CacheExtentStyle {
...
@@ -32,7 +32,6 @@ 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.
// ignore: unused_element
factory
RenderAbstractViewport
.
_
()
=>
throw
Error
();
factory
RenderAbstractViewport
.
_
()
=>
throw
Error
();
/// Returns the [RenderAbstractViewport] that most tightly encloses the given
/// Returns the [RenderAbstractViewport] that most tightly encloses the given
...
...
packages/flutter/lib/src/semantics/semantics_service.dart
View file @
efbde443
...
@@ -20,7 +20,6 @@ import 'semantics_event.dart' show AnnounceSemanticsEvent, TooltipSemanticsEvent
...
@@ -20,7 +20,6 @@ import 'semantics_event.dart' show AnnounceSemanticsEvent, TooltipSemanticsEvent
class
SemanticsService
{
class
SemanticsService
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
SemanticsService
.
_
();
SemanticsService
.
_
();
/// Sends a semantic announcement.
/// Sends a semantic announcement.
...
...
packages/flutter/lib/src/services/asset_bundle.dart
View file @
efbde443
...
@@ -66,11 +66,8 @@ abstract class AssetBundle {
...
@@ -66,11 +66,8 @@ abstract class AssetBundle {
/// implementation.)
/// implementation.)
Future
<
String
>
loadString
(
String
key
,
{
bool
cache
=
true
})
async
{
Future
<
String
>
loadString
(
String
key
,
{
bool
cache
=
true
})
async
{
final
ByteData
data
=
await
load
(
key
);
final
ByteData
data
=
await
load
(
key
);
// Note: data has a non-nullable type, but might be null when running with
// weak checking, so we need to null check it anyway (and ignore the warning
// that the null-handling logic is dead code).
if
(
data
==
null
)
if
(
data
==
null
)
throw
FlutterError
(
'Unable to load asset:
$key
'
);
// ignore: dead_code
throw
FlutterError
(
'Unable to load asset:
$key
'
);
// 50 KB of data should take 2-3 ms to parse on a Moto G4, and about 400 μs
// 50 KB of data should take 2-3 ms to parse on a Moto G4, and about 400 μs
// on a Pixel 4.
// on a Pixel 4.
if
(
data
.
lengthInBytes
<
50
*
1024
)
{
if
(
data
.
lengthInBytes
<
50
*
1024
)
{
...
...
packages/flutter/lib/src/services/clipboard.dart
View file @
efbde443
...
@@ -24,7 +24,6 @@ class ClipboardData {
...
@@ -24,7 +24,6 @@ class ClipboardData {
class
Clipboard
{
class
Clipboard
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
Clipboard
.
_
();
Clipboard
.
_
();
// Constants for common [getData] [format] types.
// Constants for common [getData] [format] types.
...
...
packages/flutter/lib/src/services/haptic_feedback.dart
View file @
efbde443
...
@@ -12,7 +12,6 @@ import 'system_channels.dart';
...
@@ -12,7 +12,6 @@ import 'system_channels.dart';
class
HapticFeedback
{
class
HapticFeedback
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
HapticFeedback
.
_
();
HapticFeedback
.
_
();
/// Provides vibration haptic feedback to the user for a short duration.
/// Provides vibration haptic feedback to the user for a short duration.
...
...
packages/flutter/lib/src/services/system_channels.dart
View file @
efbde443
...
@@ -11,7 +11,6 @@ import 'platform_channel.dart';
...
@@ -11,7 +11,6 @@ import 'platform_channel.dart';
class
SystemChannels
{
class
SystemChannels
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
SystemChannels
.
_
();
SystemChannels
.
_
();
/// A JSON [MethodChannel] for navigation.
/// A JSON [MethodChannel] for navigation.
...
...
packages/flutter/lib/src/services/system_chrome.dart
View file @
efbde443
...
@@ -219,7 +219,6 @@ List<String> _stringify(List<dynamic> list) => <String>[
...
@@ -219,7 +219,6 @@ List<String> _stringify(List<dynamic> list) => <String>[
class
SystemChrome
{
class
SystemChrome
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
SystemChrome
.
_
();
SystemChrome
.
_
();
/// Specifies the set of orientations the application interface can
/// Specifies the set of orientations the application interface can
...
...
packages/flutter/lib/src/services/system_navigator.dart
View file @
efbde443
...
@@ -9,7 +9,6 @@ import 'system_channels.dart';
...
@@ -9,7 +9,6 @@ import 'system_channels.dart';
class
SystemNavigator
{
class
SystemNavigator
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
SystemNavigator
.
_
();
SystemNavigator
.
_
();
/// Removes the topmost Flutter instance, presenting what was before
/// Removes the topmost Flutter instance, presenting what was before
...
...
packages/flutter/lib/src/services/system_sound.dart
View file @
efbde443
...
@@ -29,7 +29,6 @@ enum SystemSoundType {
...
@@ -29,7 +29,6 @@ enum SystemSoundType {
class
SystemSound
{
class
SystemSound
{
// This class is not meant to be instantiated or extended; this constructor
// This class is not meant to be instantiated or extended; this constructor
// prevents instantiation and extension.
// prevents instantiation and extension.
// ignore: unused_element
SystemSound
.
_
();
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
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
efbde443
...
@@ -1745,7 +1745,7 @@ abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
...
@@ -1745,7 +1745,7 @@ abstract class MultiChildRenderObjectWidget extends RenderObjectWidget {
assert
(()
{
assert
(()
{
for
(
int
index
=
0
;
index
<
children
.
length
;
index
++)
{
for
(
int
index
=
0
;
index
<
children
.
length
;
index
++)
{
// TODO(a14n): remove this check to have a lot more const widget
// TODO(a14n): remove this check to have a lot more const widget
if
(
children
[
index
]
==
null
)
{
// ignore: dead_code
if
(
children
[
index
]
==
null
)
{
throw
FlutterError
(
throw
FlutterError
(
"
$runtimeType
's children must not contain any null values, "
"
$runtimeType
's children must not contain any null values, "
'but a null value was found at index
$index
'
'but a null value was found at index
$index
'
...
...
packages/flutter/lib/src/widgets/navigator.dart
View file @
efbde443
...
@@ -5355,13 +5355,13 @@ abstract class _RestorationInformation {
...
@@ -5355,13 +5355,13 @@ abstract class _RestorationInformation {
final
List
<
Object
?>
casted
=
data
as
List
<
Object
?>;
final
List
<
Object
?>
casted
=
data
as
List
<
Object
?>;
assert
(
casted
.
isNotEmpty
);
assert
(
casted
.
isNotEmpty
);
final
_RouteRestorationType
type
=
_RouteRestorationType
.
values
[
casted
[
0
]!
as
int
];
final
_RouteRestorationType
type
=
_RouteRestorationType
.
values
[
casted
[
0
]!
as
int
];
assert
(
type
!=
null
);
switch
(
type
)
{
switch
(
type
)
{
case
_RouteRestorationType
.
named
:
case
_RouteRestorationType
.
named
:
return
_NamedRestorationInformation
.
fromSerializableData
(
casted
.
sublist
(
1
));
return
_NamedRestorationInformation
.
fromSerializableData
(
casted
.
sublist
(
1
));
case
_RouteRestorationType
.
anonymous
:
case
_RouteRestorationType
.
anonymous
:
return
_AnonymousRestorationInformation
.
fromSerializableData
(
casted
.
sublist
(
1
));
return
_AnonymousRestorationInformation
.
fromSerializableData
(
casted
.
sublist
(
1
));
}
}
throw
StateError
(
'Invalid type:
$type
'
);
// ignore: dead_code
}
}
final
_RouteRestorationType
type
;
final
_RouteRestorationType
type
;
...
...
packages/flutter/lib/src/widgets/scroll_view.dart
View file @
efbde443
...
@@ -1278,7 +1278,7 @@ class ListView extends BoxScrollView {
...
@@ -1278,7 +1278,7 @@ class ListView extends BoxScrollView {
}
else
{
}
else
{
widget
=
separatorBuilder
(
context
,
itemIndex
);
widget
=
separatorBuilder
(
context
,
itemIndex
);
assert
(()
{
assert
(()
{
if
(
widget
==
null
)
{
// ignore: dead_code
if
(
widget
==
null
)
{
throw
FlutterError
(
'separatorBuilder cannot return null.'
);
throw
FlutterError
(
'separatorBuilder cannot return null.'
);
}
}
return
true
;
return
true
;
...
...
packages/flutter/test/material/elevated_button_test.dart
View file @
efbde443
...
@@ -793,11 +793,13 @@ void main() {
...
@@ -793,11 +793,13 @@ void main() {
for
(
final
double
textScaleFactor
in
textScaleFactorOptions
)
{
for
(
final
double
textScaleFactor
in
textScaleFactorOptions
)
{
for
(
final
TextDirection
textDirection
in
textDirectionOptions
)
{
for
(
final
TextDirection
textDirection
in
textDirectionOptions
)
{
for
(
final
Widget
?
icon
in
iconOptions
)
{
for
(
final
Widget
?
icon
in
iconOptions
)
{
final
String
testName
=
'ElevatedButton'
final
String
testName
=
<
String
>[
', text scale
$textScaleFactor
'
// ignore: missing_whitespace_between_adjacent_strings, https://github.com/dart-lang/linter/issues/2489
'ElevatedButton, text scale
$textScaleFactor
'
,
'
${icon != null ? ", with icon" : ""}
'
if
(
icon
!=
null
)
'
${textDirection == TextDirection.rtl ? ", RTL" : ""}
'
;
'with icon'
,
if
(
textDirection
==
TextDirection
.
rtl
)
'RTL'
,
].
join
(
', '
);
testWidgets
(
testName
,
(
WidgetTester
tester
)
async
{
testWidgets
(
testName
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
MaterialApp
(
MaterialApp
(
...
...
packages/flutter/test/material/outlined_button_test.dart
View file @
efbde443
...
@@ -1038,11 +1038,13 @@ void main() {
...
@@ -1038,11 +1038,13 @@ void main() {
for
(
final
double
textScaleFactor
in
textScaleFactorOptions
)
{
for
(
final
double
textScaleFactor
in
textScaleFactorOptions
)
{
for
(
final
TextDirection
textDirection
in
textDirectionOptions
)
{
for
(
final
TextDirection
textDirection
in
textDirectionOptions
)
{
for
(
final
Widget
?
icon
in
iconOptions
)
{
for
(
final
Widget
?
icon
in
iconOptions
)
{
final
String
testName
=
'OutlinedButton'
final
String
testName
=
<
String
>[
', text scale
$textScaleFactor
'
// ignore: missing_whitespace_between_adjacent_strings, https://github.com/dart-lang/linter/issues/2489
'OutlinedButton, text scale
$textScaleFactor
'
,
'
${icon != null ? ", with icon" : ""}
'
if
(
icon
!=
null
)
'
${textDirection == TextDirection.rtl ? ", RTL" : ""}
'
;
'with icon'
,
if
(
textDirection
==
TextDirection
.
rtl
)
'RTL'
,
].
join
(
', '
);
testWidgets
(
testName
,
(
WidgetTester
tester
)
async
{
testWidgets
(
testName
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
MaterialApp
(
MaterialApp
(
...
...
packages/flutter/test/material/text_button_test.dart
View file @
efbde443
...
@@ -831,10 +831,13 @@ void main() {
...
@@ -831,10 +831,13 @@ void main() {
for
(
final
double
textScaleFactor
in
textScaleFactorOptions
)
{
for
(
final
double
textScaleFactor
in
textScaleFactorOptions
)
{
for
(
final
TextDirection
textDirection
in
textDirectionOptions
)
{
for
(
final
TextDirection
textDirection
in
textDirectionOptions
)
{
for
(
final
Widget
?
icon
in
iconOptions
)
{
for
(
final
Widget
?
icon
in
iconOptions
)
{
final
String
testName
=
'TextButton'
final
String
testName
=
<
String
>[
', text scale
$textScaleFactor
'
// ignore: missing_whitespace_between_adjacent_strings, https://github.com/dart-lang/linter/issues/2489
'TextButton, text scale
$textScaleFactor
'
,
'
${icon != null ? ", with icon" : ""}
'
if
(
icon
!=
null
)
'
${textDirection == TextDirection.rtl ? ", RTL" : ""}
'
;
'with icon'
,
if
(
textDirection
==
TextDirection
.
rtl
)
'RTL'
,
].
join
(
', '
);
testWidgets
(
testName
,
(
WidgetTester
tester
)
async
{
testWidgets
(
testName
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/material/time_picker_test.dart
View file @
efbde443
...
@@ -427,7 +427,7 @@ void _tests() {
...
@@ -427,7 +427,7 @@ void _tests() {
);
);
// Ensure we preserve day period as we roll over.
// Ensure we preserve day period as we roll over.
final
dynamic
pickerState
=
tester
.
state
(
_timePickerDialog
);
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
pickerState
=
tester
.
state
(
_timePickerDialog
);
expect
(
pickerState
.
selectedTime
,
const
TimeOfDay
(
hour:
1
,
minute:
0
));
expect
(
pickerState
.
selectedTime
,
const
TimeOfDay
(
hour:
1
,
minute:
0
));
await
actAndExpect
(
await
actAndExpect
(
...
@@ -492,7 +492,7 @@ void _tests() {
...
@@ -492,7 +492,7 @@ void _tests() {
);
);
// Ensure we preserve hour period as we roll over.
// Ensure we preserve hour period as we roll over.
final
dynamic
pickerState
=
tester
.
state
(
_timePickerDialog
);
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
pickerState
=
tester
.
state
(
_timePickerDialog
);
expect
(
pickerState
.
selectedTime
,
const
TimeOfDay
(
hour:
11
,
minute:
0
));
expect
(
pickerState
.
selectedTime
,
const
TimeOfDay
(
hour:
11
,
minute:
0
));
await
actAndExpect
(
await
actAndExpect
(
...
...
packages/flutter/test/material/will_pop_test.dart
View file @
efbde443
...
@@ -116,7 +116,7 @@ void main() {
...
@@ -116,7 +116,7 @@ void main() {
// Use didPopRoute() to simulate the system back button. Check that
// Use didPopRoute() to simulate the system back button. Check that
// didPopRoute() indicates that the notification was handled.
// didPopRoute() indicates that the notification was handled.
final
dynamic
widgetsAppState
=
tester
.
state
(
find
.
byType
(
WidgetsApp
));
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
widgetsAppState
=
tester
.
state
(
find
.
byType
(
WidgetsApp
));
expect
(
await
widgetsAppState
.
didPopRoute
(),
isTrue
);
expect
(
await
widgetsAppState
.
didPopRoute
(),
isTrue
);
expect
(
find
.
text
(
'Sample Page'
),
findsOneWidget
);
expect
(
find
.
text
(
'Sample Page'
),
findsOneWidget
);
...
...
packages/flutter/test/painting/mocks_for_image_cache.dart
View file @
efbde443
...
@@ -8,7 +8,6 @@ import 'dart:ui' as ui show Image;
...
@@ -8,7 +8,6 @@ import 'dart:ui' as ui show Image;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/painting.dart'
;
// ignore: must_be_immutable
class
TestImageInfo
implements
ImageInfo
{
class
TestImageInfo
implements
ImageInfo
{
const
TestImageInfo
(
this
.
value
,
{
required
this
.
image
,
this
.
scale
=
1.0
,
this
.
debugLabel
});
const
TestImageInfo
(
this
.
value
,
{
required
this
.
image
,
this
.
scale
=
1.0
,
this
.
debugLabel
});
...
...
packages/flutter/test/painting/system_fonts_test.dart
View file @
efbde443
...
@@ -74,7 +74,7 @@ void main() {
...
@@ -74,7 +74,7 @@ void main() {
),
),
),
),
);
);
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
CupertinoDatePicker
));
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
CupertinoDatePicker
));
final
Map
<
int
,
double
>
cache
=
state
.
estimatedColumnWidths
as
Map
<
int
,
double
>;
final
Map
<
int
,
double
>
cache
=
state
.
estimatedColumnWidths
as
Map
<
int
,
double
>;
expect
(
cache
.
isNotEmpty
,
isTrue
);
expect
(
cache
.
isNotEmpty
,
isTrue
);
const
Map
<
String
,
dynamic
>
data
=
<
String
,
dynamic
>{
const
Map
<
String
,
dynamic
>
data
=
<
String
,
dynamic
>{
...
@@ -100,7 +100,7 @@ void main() {
...
@@ -100,7 +100,7 @@ void main() {
),
),
),
),
);
);
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
CupertinoDatePicker
));
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
CupertinoDatePicker
));
final
Map
<
int
,
double
>
cache
=
state
.
estimatedColumnWidths
as
Map
<
int
,
double
>;
final
Map
<
int
,
double
>
cache
=
state
.
estimatedColumnWidths
as
Map
<
int
,
double
>;
// Simulates font missing.
// Simulates font missing.
cache
.
clear
();
cache
.
clear
();
...
@@ -126,7 +126,7 @@ void main() {
...
@@ -126,7 +126,7 @@ void main() {
),
),
),
),
);
);
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
CupertinoTimerPicker
));
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
CupertinoTimerPicker
));
// Simulates wrong metrics due to font missing.
// Simulates wrong metrics due to font missing.
state
.
numberLabelWidth
=
0.0
;
state
.
numberLabelWidth
=
0.0
;
state
.
numberLabelHeight
=
0.0
;
state
.
numberLabelHeight
=
0.0
;
...
...
packages/flutter/test/services/text_input_test.dart
View file @
efbde443
...
@@ -133,7 +133,7 @@ void main() {
...
@@ -133,7 +133,7 @@ void main() {
test
(
'basic structure'
,
()
async
{
test
(
'basic structure'
,
()
async
{
const
TextInputType
text
=
TextInputType
.
text
;
const
TextInputType
text
=
TextInputType
.
text
;
const
TextInputType
number
=
TextInputType
.
number
;
const
TextInputType
number
=
TextInputType
.
number
;
const
TextInputType
number2
=
TextInputType
.
numberWithOptions
();
// ignore: use_named_constants
const
TextInputType
number2
=
TextInputType
.
numberWithOptions
();
const
TextInputType
signed
=
TextInputType
.
numberWithOptions
(
signed:
true
);
const
TextInputType
signed
=
TextInputType
.
numberWithOptions
(
signed:
true
);
const
TextInputType
signed2
=
TextInputType
.
numberWithOptions
(
signed:
true
);
const
TextInputType
signed2
=
TextInputType
.
numberWithOptions
(
signed:
true
);
const
TextInputType
decimal
=
TextInputType
.
numberWithOptions
(
decimal:
true
);
const
TextInputType
decimal
=
TextInputType
.
numberWithOptions
(
decimal:
true
);
...
...
packages/flutter/test/widgets/gesture_detector_test.dart
View file @
efbde443
...
@@ -908,7 +908,7 @@ class ButtonVariant extends TestVariant<int> {
...
@@ -908,7 +908,7 @@ class ButtonVariant extends TestVariant<int> {
const
ButtonVariant
({
const
ButtonVariant
({
required
this
.
values
,
required
this
.
values
,
required
this
.
descriptions
,
required
this
.
descriptions
,
})
:
assert
(
values
.
length
!=
0
);
// ignore: prefer_is_empty
})
:
assert
(
values
.
length
!=
0
);
@override
@override
final
List
<
int
>
values
;
final
List
<
int
>
values
;
...
...
packages/flutter/test/widgets/localizations_test.dart
View file @
efbde443
...
@@ -20,7 +20,7 @@ void main() {
...
@@ -20,7 +20,7 @@ void main() {
],
],
child:
const
Text
(
'loaded'
)
child:
const
Text
(
'loaded'
)
));
));
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
Localizations
));
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
state
=
tester
.
state
(
find
.
byType
(
Localizations
));
expect
(
state
!.
locale
,
isNull
);
expect
(
state
!.
locale
,
isNull
);
expect
(
find
.
text
(
'loaded'
),
findsNothing
);
expect
(
find
.
text
(
'loaded'
),
findsNothing
);
...
...
packages/flutter/test/widgets/overlay_test.dart
View file @
efbde443
...
@@ -1035,7 +1035,6 @@ void main() {
...
@@ -1035,7 +1035,6 @@ void main() {
);
);
// By default, clipBehavior should be Clip.hardEdge
// By default, clipBehavior should be Clip.hardEdge
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
renderObject
=
tester
.
renderObject
(
find
.
byType
(
Overlay
));
final
dynamic
renderObject
=
tester
.
renderObject
(
find
.
byType
(
Overlay
));
expect
(
renderObject
.
clipBehavior
,
equals
(
Clip
.
hardEdge
));
expect
(
renderObject
.
clipBehavior
,
equals
(
Clip
.
hardEdge
));
...
...
packages/flutter/test/widgets/single_child_scroll_view_test.dart
View file @
efbde443
...
@@ -50,7 +50,7 @@ void main() {
...
@@ -50,7 +50,7 @@ void main() {
);
);
// 1st, check that the render object has received the default clip behavior.
// 1st, check that the render object has received the default clip behavior.
final
dynamic
renderObject
=
tester
.
allRenderObjects
.
where
((
RenderObject
o
)
=>
o
.
runtimeType
.
toString
()
==
'_RenderSingleChildViewport'
).
first
;
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
renderObject
=
tester
.
allRenderObjects
.
where
((
RenderObject
o
)
=>
o
.
runtimeType
.
toString
()
==
'_RenderSingleChildViewport'
).
first
;
expect
(
renderObject
.
clipBehavior
,
equals
(
Clip
.
hardEdge
));
expect
(
renderObject
.
clipBehavior
,
equals
(
Clip
.
hardEdge
));
// 2nd, height == widow.height test: check that the painting context does not call pushClipRect .
// 2nd, height == widow.height test: check that the painting context does not call pushClipRect .
...
@@ -104,7 +104,7 @@ void main() {
...
@@ -104,7 +104,7 @@ void main() {
await
tester
.
pumpWidget
(
SingleChildScrollView
(
child:
Container
(
height:
2000.0
)));
await
tester
.
pumpWidget
(
SingleChildScrollView
(
child:
Container
(
height:
2000.0
)));
// 1st, check that the render object has received the default clip behavior.
// 1st, check that the render object has received the default clip behavior.
final
dynamic
renderObject
=
tester
.
allRenderObjects
.
where
((
RenderObject
o
)
=>
o
.
runtimeType
.
toString
()
==
'_RenderSingleChildViewport'
).
first
;
// ignore: unnecessary_nullable_for_final_variable_declarations
final
dynamic
renderObject
=
tester
.
allRenderObjects
.
where
((
RenderObject
o
)
=>
o
.
runtimeType
.
toString
()
==
'_RenderSingleChildViewport'
).
first
;
expect
(
renderObject
.
clipBehavior
,
equals
(
Clip
.
hardEdge
));
expect
(
renderObject
.
clipBehavior
,
equals
(
Clip
.
hardEdge
));
// 2nd, check that the painting context has received the default clip behavior.
// 2nd, check that the painting context has received the default clip behavior.
...
...
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