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;
|
||||
card = DesktopProductCard(
|
||||
product: products[productCardIndex],
|
||||
imageWidth: startLarge
|
||||
? ((productCardIndex.isEven)
|
||||
? largeImageWidth
|
||||
: smallImageWidth)
|
||||
: ((productCardIndex.isEven)
|
||||
? smallImageWidth
|
||||
: largeImageWidth),
|
||||
imageWidth: startLarge == productCardIndex.isEven
|
||||
? largeImageWidth
|
||||
: smallImageWidth,
|
||||
);
|
||||
} else {
|
||||
// This is just a divider.
|
||||
|
@ -579,7 +579,7 @@ class RenderStack extends RenderBox
|
||||
Size _computeSize({required BoxConstraints constraints, required ChildLayouter layoutChild}) {
|
||||
bool hasNonPositionedChildren = false;
|
||||
if (childCount == 0) {
|
||||
return (constraints.biggest.isFinite) ? constraints.biggest : constraints.smallest;
|
||||
return constraints.biggest.isFinite ? constraints.biggest : constraints.smallest;
|
||||
}
|
||||
|
||||
double width = constraints.minWidth;
|
||||
|
@ -641,7 +641,7 @@ class StandardMethodCodec implements MethodCodec {
|
||||
final Object? errorCode = messageCodec.readValue(buffer);
|
||||
final Object? errorMessage = 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) {
|
||||
throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace);
|
||||
} else {
|
||||
|
@ -788,7 +788,7 @@ void main() {
|
||||
controller: scrollController,
|
||||
child: AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
child: (s.isEven)
|
||||
child: s.isEven
|
||||
? ListView(
|
||||
children: <Widget>[
|
||||
ElevatedButton(
|
||||
|
@ -393,16 +393,19 @@ Please provide a valid TCP port (an integer between 0 and 65535, inclusive).
|
||||
}
|
||||
}
|
||||
|
||||
WebCompilerConfig get _compilerConfig => (debuggingOptions.webUseWasm)
|
||||
? WasmCompilerConfig(
|
||||
WebCompilerConfig get _compilerConfig {
|
||||
if (debuggingOptions.webUseWasm) {
|
||||
return WasmCompilerConfig(
|
||||
optimizationLevel: 0,
|
||||
stripWasm: false,
|
||||
renderer: debuggingOptions.webRenderer
|
||||
)
|
||||
: JsCompilerConfig.run(
|
||||
nativeNullAssertions: debuggingOptions.nativeNullAssertions,
|
||||
renderer: debuggingOptions.webRenderer,
|
||||
);
|
||||
}
|
||||
return JsCompilerConfig.run(
|
||||
nativeNullAssertions: debuggingOptions.nativeNullAssertions,
|
||||
renderer: debuggingOptions.webRenderer,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<OperationResult> restart({
|
||||
|
Loading…
x
Reference in New Issue
Block a user