Removing unnecessary parenthesis (#156928)
This is simply removing unnecessary parenthesis from various places. This change is because of a change to the unnecessary_parentesis lint that will trigger there. Here is the CL https://dart-review.googlesource.com/c/sdk/+/390161. - https://github.com/dart-lang/linter/issues/4996 If anything else is needed please let me know. I'd like to ask for this PR to wait a bit until the bots are run again on that CL so that I can be sure nothing else will trigger, I will come back here and update this whenever everything is complete. Thanks!
This commit is contained in:
parent
4ed8136610
commit
c40f418c05
@ -59,13 +59,9 @@ class DesktopProductCardColumn extends StatelessWidget {
|
|||||||
final int productCardIndex = index ~/ 2;
|
final int productCardIndex = index ~/ 2;
|
||||||
card = DesktopProductCard(
|
card = DesktopProductCard(
|
||||||
product: products[productCardIndex],
|
product: products[productCardIndex],
|
||||||
imageWidth: startLarge
|
imageWidth: startLarge == productCardIndex.isEven
|
||||||
? ((productCardIndex.isEven)
|
|
||||||
? largeImageWidth
|
? largeImageWidth
|
||||||
: smallImageWidth)
|
: smallImageWidth,
|
||||||
: ((productCardIndex.isEven)
|
|
||||||
? smallImageWidth
|
|
||||||
: largeImageWidth),
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// This is just a divider.
|
// This is just a divider.
|
||||||
|
@ -579,7 +579,7 @@ class RenderStack extends RenderBox
|
|||||||
Size _computeSize({required BoxConstraints constraints, required ChildLayouter layoutChild}) {
|
Size _computeSize({required BoxConstraints constraints, required ChildLayouter layoutChild}) {
|
||||||
bool hasNonPositionedChildren = false;
|
bool hasNonPositionedChildren = false;
|
||||||
if (childCount == 0) {
|
if (childCount == 0) {
|
||||||
return (constraints.biggest.isFinite) ? constraints.biggest : constraints.smallest;
|
return constraints.biggest.isFinite ? constraints.biggest : constraints.smallest;
|
||||||
}
|
}
|
||||||
|
|
||||||
double width = constraints.minWidth;
|
double width = constraints.minWidth;
|
||||||
|
@ -641,7 +641,7 @@ class StandardMethodCodec implements MethodCodec {
|
|||||||
final Object? errorCode = messageCodec.readValue(buffer);
|
final Object? errorCode = messageCodec.readValue(buffer);
|
||||||
final Object? errorMessage = messageCodec.readValue(buffer);
|
final Object? errorMessage = messageCodec.readValue(buffer);
|
||||||
final Object? errorDetails = messageCodec.readValue(buffer);
|
final Object? errorDetails = messageCodec.readValue(buffer);
|
||||||
final String? errorStacktrace = (buffer.hasRemaining) ? messageCodec.readValue(buffer) as String? : null;
|
final String? errorStacktrace = buffer.hasRemaining ? messageCodec.readValue(buffer) as String? : null;
|
||||||
if (errorCode is String && (errorMessage == null || errorMessage is String) && !buffer.hasRemaining) {
|
if (errorCode is String && (errorMessage == null || errorMessage is String) && !buffer.hasRemaining) {
|
||||||
throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace);
|
throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace);
|
||||||
} else {
|
} else {
|
||||||
|
@ -788,7 +788,7 @@ void main() {
|
|||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
child: AnimatedSwitcher(
|
child: AnimatedSwitcher(
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 500),
|
||||||
child: (s.isEven)
|
child: s.isEven
|
||||||
? ListView(
|
? ListView(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
|
@ -393,16 +393,19 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WebCompilerConfig get _compilerConfig => (debuggingOptions.webUseWasm)
|
WebCompilerConfig get _compilerConfig {
|
||||||
? WasmCompilerConfig(
|
if (debuggingOptions.webUseWasm) {
|
||||||
|
return WasmCompilerConfig(
|
||||||
optimizationLevel: 0,
|
optimizationLevel: 0,
|
||||||
stripWasm: false,
|
stripWasm: false,
|
||||||
renderer: debuggingOptions.webRenderer
|
renderer: debuggingOptions.webRenderer
|
||||||
)
|
);
|
||||||
: JsCompilerConfig.run(
|
}
|
||||||
|
return JsCompilerConfig.run(
|
||||||
nativeNullAssertions: debuggingOptions.nativeNullAssertions,
|
nativeNullAssertions: debuggingOptions.nativeNullAssertions,
|
||||||
renderer: debuggingOptions.webRenderer,
|
renderer: debuggingOptions.webRenderer,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<OperationResult> restart({
|
Future<OperationResult> restart({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user