Add missing returns.
As of `1.18.0-dev-0`, these cases will get flagged. In the meantime, the
This commit is contained in:
@@ -83,6 +83,7 @@ class OperationToken extends ExpressionToken {
|
||||
case Operation.Division:
|
||||
return ' \u00F7 ';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,6 +259,7 @@ class CalcExpression {
|
||||
case ExpressionState.Result:
|
||||
return appendOperation(Operation.Subtraction);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Computes the result of the current expression and returns a new
|
||||
|
||||
@@ -130,6 +130,7 @@ class GridDemoPhotoItem extends StatelessWidget {
|
||||
child: image
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ class StocksAppState extends State<StocksApp> {
|
||||
accentColor: Colors.redAccent[200]
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Route<Null> _getRoute(RouteSettings settings) {
|
||||
|
||||
@@ -287,6 +287,7 @@ class ReverseAnimation extends Animation<double>
|
||||
case AnimationStatus.completed: return AnimationStatus.dismissed;
|
||||
case AnimationStatus.dismissed: return AnimationStatus.completed;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -157,7 +157,6 @@ class Expression extends EquationMember {
|
||||
if (!m.isConstant) {
|
||||
throw new ParserException(
|
||||
'The divisor was not a constant expression', <EquationMember>[this, m]);
|
||||
return null;
|
||||
}
|
||||
|
||||
return this._applyMultiplicand(1.0 / m.value);
|
||||
|
||||
@@ -227,6 +227,7 @@ class _MaterialButtonState extends State<MaterialButton> {
|
||||
return Colors.white30;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void _handleHighlightChanged(bool value) {
|
||||
|
||||
@@ -63,6 +63,7 @@ class Dialog extends StatelessWidget {
|
||||
case Brightness.dark:
|
||||
return Colors.grey[800];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -67,6 +67,7 @@ class DrawerItem extends StatelessWidget {
|
||||
return Colors.white30;
|
||||
return null; // use default icon theme colour unmodified
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
TextStyle _getTextStyle(ThemeData themeData) {
|
||||
|
||||
@@ -65,6 +65,7 @@ class Icon extends StatelessWidget {
|
||||
case Brightness.light:
|
||||
return Colors.black;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Color _getDefaultColor(BuildContext context) {
|
||||
|
||||
@@ -104,6 +104,7 @@ class RaisedButton extends StatelessWidget {
|
||||
case Brightness.dark:
|
||||
return Colors.white12;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,4 +186,5 @@ Widget buildTextSelectionHandle(
|
||||
child: handle
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1353,6 +1353,7 @@ class BoxDecoration extends Decoration {
|
||||
double distance = (position - center).distance;
|
||||
return distance <= math.min(size.width, size.height) / 2.0;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -125,6 +125,7 @@ class TextPainter {
|
||||
case TextBaseline.ideographic:
|
||||
return _paragraph.ideographicBaseline;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
double _lastMinWidth;
|
||||
@@ -211,6 +212,7 @@ class TextPainter {
|
||||
?? _getOffsetFromUpstream(offset, caretPrototype)
|
||||
?? emptyOffset;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Returns a list of rects that bound the given selection.
|
||||
|
||||
@@ -1125,7 +1125,6 @@ abstract class RenderBox extends RenderObject {
|
||||
'set a size and lay out any children, or, set sizedByParent to true '
|
||||
'so that performResize() sizes the render object.'
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -82,6 +82,7 @@ class RenderList extends RenderVirtualViewport<ListParentData> {
|
||||
case Axis.horizontal:
|
||||
return padding.horizontal;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
double get _preferredExtent {
|
||||
|
||||
@@ -57,6 +57,7 @@ class ViewportDimensions {
|
||||
case ViewportAnchor.end:
|
||||
return paintOffset + (containerSize - contentSize);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -112,6 +112,7 @@ class BannerPainter extends CustomPainter {
|
||||
case BannerLocation.topLeft:
|
||||
return -math.PI / 4.0;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,6 @@ class _DismissableState extends State<Dismissable> {
|
||||
return vy > _kMinFlingVelocity;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void _handleDragEnd(DragEndDetails details) {
|
||||
|
||||
@@ -740,6 +740,7 @@ class _LazyBlockElement extends RenderObjectElement {
|
||||
case Axis.vertical:
|
||||
return new Offset(0.0, size.height);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static RenderBox _getNextWithin(_RenderLazyBlock block, RenderBox child) {
|
||||
|
||||
@@ -224,6 +224,7 @@ abstract class PageableState<T extends Pageable> extends ScrollableState<T> {
|
||||
case Axis.vertical:
|
||||
return box.size.height;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -285,6 +285,7 @@ class ScrollableState<T extends Scrollable> extends State<T> {
|
||||
case ViewportAnchor.end:
|
||||
return pixelOffset;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Convert a scrollOffset value to the number of pixels to which it corresponds.
|
||||
|
||||
@@ -239,6 +239,7 @@ class _VirtualListViewport extends VirtualViewport {
|
||||
}
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -294,5 +294,6 @@ class _TextSelectionHandleOverlayState extends State<_TextSelectionHandleOverlay
|
||||
case TextDirection.rtl:
|
||||
return rtlType;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ abstract class VirtualViewportElement extends RenderObjectElement {
|
||||
case ViewportAnchor.end:
|
||||
return scrollOffset;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Returns a two-dimensional representation of the scroll offset, accounting
|
||||
|
||||
@@ -29,6 +29,7 @@ class TestOrientedBox extends SingleChildRenderObjectWidget {
|
||||
case Orientation.portrait:
|
||||
return new BoxDecoration(backgroundColor: const Color(0xFF0000FF));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -134,6 +134,7 @@ ApplicationPackage getApplicationPackageForPlatform(TargetPlatform platform) {
|
||||
case TargetPlatform.linux_x64:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
class ApplicationPackageStore {
|
||||
@@ -156,5 +157,6 @@ class ApplicationPackageStore {
|
||||
case TargetPlatform.linux_x64:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ String getNameForHostPlatform(HostPlatform platform) {
|
||||
return 'linux-x64';
|
||||
}
|
||||
assert(false);
|
||||
return null;
|
||||
}
|
||||
|
||||
enum TargetPlatform {
|
||||
@@ -80,6 +81,7 @@ String getNameForTargetPlatform(TargetPlatform platform) {
|
||||
return 'linux-x64';
|
||||
}
|
||||
assert(false);
|
||||
return null;
|
||||
}
|
||||
|
||||
TargetPlatform getTargetPlatformForName(String platform) {
|
||||
|
||||
@@ -235,7 +235,6 @@ class IOSDevice extends Device {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user