From 430bbc0e7eafd6bbf4c0bce802c1da77af7c8495 Mon Sep 17 00:00:00 2001 From: imaNNeoFighT Date: Sat, 7 Oct 2023 03:14:37 +0200 Subject: [PATCH 1/2] Consider fraction digits when formatting chart side titles, #1267 --- .../side_titles/side_titles_widget.dart | 6 +- lib/src/utils/utils.dart | 49 +++++-- pubspec.yaml | 6 +- .../bar_chart/bar_chart_painter_test.dart | 6 +- .../bar_chart_painter_test.mocks.dart | 102 +++++++++++++- .../bar_chart_renderer_test.mocks.dart | 81 ++++++++++- .../line_chart_painter_test.mocks.dart | 130 +++++++++++++++++- .../line_chart_renderer_test.mocks.dart | 95 ++++++++++++- .../pie_chart_painter_test.mocks.dart | 102 +++++++++++++- .../pie_chart_renderer_test.mocks.dart | 78 ++++++++++- .../radar_chart_painter_test.mocks.dart | 102 +++++++++++++- .../radar_chart_renderer_test.mocks.dart | 82 ++++++++++- .../scatter_chart_painter_test.mocks.dart | 102 +++++++++++++- .../scatter_chart_renderer_test.mocks.dart | 80 ++++++++++- test/utils/canvas_wrapper_test.mocks.dart | 74 +++++++++- test/utils/utils_test.dart | 73 ++++++---- test/utils/utils_test.mocks.dart | 46 ++++++- 17 files changed, 1144 insertions(+), 70 deletions(-) diff --git a/lib/src/chart/base/axis_chart/side_titles/side_titles_widget.dart b/lib/src/chart/base/axis_chart/side_titles/side_titles_widget.dart index 37be97326..aa3f58ea5 100644 --- a/lib/src/chart/base/axis_chart/side_titles/side_titles_widget.dart +++ b/lib/src/chart/base/axis_chart/side_titles/side_titles_widget.dart @@ -160,7 +160,11 @@ class SideTitlesWidget extends StatelessWidget { max: axisMax, appliedInterval: interval, sideTitles: sideTitles, - formattedValue: Utils().formatNumber(metaData.axisValue), + formattedValue: Utils().formatNumber( + axisMin, + axisMax, + metaData.axisValue, + ), axisSide: side, parentAxisSize: axisViewSize, axisPosition: metaData.axisPixelLocation, diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart index a8f32ba90..21b8ffa12 100644 --- a/lib/src/utils/utils.dart +++ b/lib/src/utils/utils.dart @@ -211,6 +211,32 @@ class Utils { /// kilo (thousands) number static const double kilo = 1000; + /// Returns count of fraction digits of a value + int getFractionDigits(double value) { + if (value >= 1) { + return 1; + } else if (value >= 0.1) { + return 2; + } else if (value >= 0.01) { + return 3; + } else if (value >= 0.001) { + return 4; + } else if (value >= 0.0001) { + return 5; + } else if (value >= 0.00001) { + return 6; + } else if (value >= 0.000001) { + return 7; + } else if (value >= 0.0000001) { + return 8; + } else if (value >= 0.00000001) { + return 9; + } else if (value >= 0.000000001) { + return 10; + } + return 1; + } + /// Formats and add symbols (K, M, B) at the end of number. /// /// if number is larger than [billion], it returns a short number like 13.3B, @@ -218,26 +244,29 @@ class Utils { /// if number is larger than [kilo], it returns a short number like 4K, /// otherwise it returns number itself. /// also it removes .0, at the end of number for simplicity. - String formatNumber(double number) { - final isNegative = number < 0; + String formatNumber(double axisMin, double axisMax, double axisValue) { + final isNegative = axisValue < 0; if (isNegative) { - number = number.abs(); + axisValue = axisValue.abs(); } String resultNumber; String symbol; - if (number >= billion) { - resultNumber = (number / billion).toStringAsFixed(1); + if (axisValue >= billion) { + resultNumber = (axisValue / billion).toStringAsFixed(1); symbol = 'B'; - } else if (number >= million) { - resultNumber = (number / million).toStringAsFixed(1); + } else if (axisValue >= million) { + resultNumber = (axisValue / million).toStringAsFixed(1); symbol = 'M'; - } else if (number >= kilo) { - resultNumber = (number / kilo).toStringAsFixed(1); + } else if (axisValue >= kilo) { + resultNumber = (axisValue / kilo).toStringAsFixed(1); symbol = 'K'; } else { - resultNumber = number.toStringAsFixed(1); + final diff = (axisMin - axisMax).abs(); + resultNumber = axisValue.toStringAsFixed( + getFractionDigits(diff), + ); symbol = ''; } diff --git a/pubspec.yaml b/pubspec.yaml index f46c8a296..837e3011b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,12 +19,12 @@ dependencies: sdk: flutter dev_dependencies: - build_runner: ^2.4.2 + build_runner: ^2.4.6 flutter_test: sdk: flutter - mockito: ^5.4.0 + mockito: ^5.4.2 vector_math: ^2.1.4 #Added to use in some generated codes of mockito - very_good_analysis: ^5.0.0 + very_good_analysis: ^5.1.0 screenshots: - description: 'LineChartSample1 and LineChartSample2' diff --git a/test/chart/bar_chart/bar_chart_painter_test.dart b/test/chart/bar_chart/bar_chart_painter_test.dart index 106718ebf..f5750b372 100644 --- a/test/chart/bar_chart/bar_chart_painter_test.dart +++ b/test/chart/bar_chart/bar_chart_painter_test.dart @@ -795,7 +795,7 @@ void main() { when(mockUtils.normalizeBorderSide(any, any)).thenReturn(BorderSide.none); when(mockUtils.calculateRotationOffset(any, any)).thenReturn(Offset.zero); when(mockUtils.getBestInitialIntervalValue(any, any, any)).thenReturn(0); - when(mockUtils.formatNumber(captureAny)).thenAnswer((inv) { + when(mockUtils.formatNumber(any, any, captureAny)).thenAnswer((inv) { final value = inv.positionalArguments[0] as double; return '${value.toInt()}'; }); @@ -987,7 +987,7 @@ void main() { when(mockUtils.normalizeBorderSide(any, any)).thenReturn(BorderSide.none); when(mockUtils.calculateRotationOffset(any, any)).thenReturn(Offset.zero); when(mockUtils.getBestInitialIntervalValue(any, any, any)).thenReturn(0); - when(mockUtils.formatNumber(captureAny)).thenAnswer((inv) { + when(mockUtils.formatNumber(any, any, captureAny)).thenAnswer((inv) { final value = inv.positionalArguments[0] as double; return '${value.toInt()}'; }); @@ -1182,7 +1182,7 @@ void main() { when(mockUtils.normalizeBorderSide(any, any)).thenReturn(BorderSide.none); when(mockUtils.calculateRotationOffset(any, any)).thenReturn(Offset.zero); when(mockUtils.getBestInitialIntervalValue(any, any, any)).thenReturn(0); - when(mockUtils.formatNumber(captureAny)).thenAnswer((inv) { + when(mockUtils.formatNumber(any, any, captureAny)).thenAnswer((inv) { final value = inv.positionalArguments[0] as double; return '${value.toInt()}'; }); diff --git a/test/chart/bar_chart/bar_chart_painter_test.mocks.dart b/test/chart/bar_chart/bar_chart_painter_test.mocks.dart index 7e4833f7e..87f099ca9 100644 --- a/test/chart/bar_chart/bar_chart_painter_test.mocks.dart +++ b/test/chart/bar_chart/bar_chart_painter_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/bar_chart/bar_chart_painter_test.dart. // Do not manually edit this file. @@ -155,6 +155,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -170,6 +171,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -178,6 +180,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -186,6 +189,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -194,6 +198,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -209,6 +214,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -224,6 +230,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -232,6 +239,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -247,6 +255,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i5.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -255,6 +264,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i5.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -263,6 +273,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i5.Float64List(0), ) as _i5.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -280,6 +291,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -293,6 +305,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -306,6 +319,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -320,6 +334,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -334,6 +349,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -349,6 +365,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -366,6 +383,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -374,6 +392,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -389,6 +408,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -404,6 +424,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -421,6 +442,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -436,6 +458,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -453,6 +476,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -474,6 +498,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -489,6 +514,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -506,6 +532,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -525,6 +552,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -544,6 +572,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -552,6 +581,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -567,6 +597,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -584,6 +615,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -601,6 +633,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -618,6 +651,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -643,6 +677,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -668,6 +703,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -705,6 +741,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override _i2.Size get size => (super.noSuchMethod( Invocation.getter(#size), @@ -713,6 +750,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#size), ), ) as _i2.Size); + @override void drawRRect( _i2.RRect? rrect, @@ -728,6 +766,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void save() => super.noSuchMethod( Invocation.method( @@ -736,6 +775,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -744,6 +784,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipRect( _i2.Rect? rect, { @@ -761,6 +802,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void translate( double? dx, @@ -776,6 +818,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void rotate(double? radius) => super.noSuchMethod( Invocation.method( @@ -784,6 +827,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -799,6 +843,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -814,6 +859,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -822,6 +868,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -839,6 +886,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -852,6 +900,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -867,6 +916,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -884,6 +934,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? center, @@ -901,6 +952,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -922,6 +974,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawText( _i3.TextPainter? tp, @@ -939,6 +992,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDot( _i7.FlDotPainter? painter, @@ -956,6 +1010,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRotated({ required _i2.Size? size, @@ -978,6 +1033,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDashedLine( _i2.Offset? from, @@ -1015,16 +1071,19 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { Invocation.getter(#widget), ), ) as _i3.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i3.InheritedWidget dependOnInheritedElement( _i3.InheritedElement? ancestor, { @@ -1045,6 +1104,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.InheritedWidget); + @override void visitAncestorElements(_i3.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1054,6 +1114,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i3.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1062,6 +1123,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i3.Notification? notification) => super.noSuchMethod( @@ -1071,6 +1133,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override _i3.DiagnosticsNode describeElement( String? name, { @@ -1091,6 +1154,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override _i3.DiagnosticsNode describeWidget( String? name, { @@ -1111,6 +1175,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override List<_i3.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1122,6 +1187,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValue: <_i3.DiagnosticsNode>[], ) as List<_i3.DiagnosticsNode>); + @override _i3.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1155,6 +1221,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double degrees(double? radians) => (super.noSuchMethod( Invocation.method( @@ -1163,6 +1230,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Size getDefaultSize(_i2.Size? screenSize) => (super.noSuchMethod( Invocation.method( @@ -1177,6 +1245,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Size); + @override double translateRotatedPosition( double? size, @@ -1192,6 +1261,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Offset calculateRotationOffset( _i2.Size? size, @@ -1216,6 +1286,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Offset); + @override _i3.BorderRadius? normalizeBorderRadius( _i3.BorderRadius? borderRadius, @@ -1228,6 +1299,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { width, ], )) as _i3.BorderRadius?); + @override _i3.BorderSide normalizeBorderSide( _i3.BorderSide? borderSide, @@ -1252,6 +1324,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.BorderSide); + @override double getEfficientInterval( double? axisViewSize, @@ -1269,6 +1342,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double roundInterval(double? input) => (super.noSuchMethod( Invocation.method( @@ -1277,14 +1351,34 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + + @override + int getFractionDigits(double? value) => (super.noSuchMethod( + Invocation.method( + #getFractionDigits, + [value], + ), + returnValue: 0, + ) as int); + @override - String formatNumber(double? number) => (super.noSuchMethod( + String formatNumber( + double? axisMin, + double? axisMax, + double? axisValue, + ) => + (super.noSuchMethod( Invocation.method( #formatNumber, - [number], + [ + axisMin, + axisMax, + axisValue, + ], ), returnValue: '', ) as String); + @override _i3.TextStyle getThemeAwareTextStyle( _i3.BuildContext? context, @@ -1309,6 +1403,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.TextStyle); + @override double getBestInitialIntervalValue( double? min, @@ -1328,6 +1423,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double convertRadiusToSigma(double? radius) => (super.noSuchMethod( Invocation.method( diff --git a/test/chart/bar_chart/bar_chart_renderer_test.mocks.dart b/test/chart/bar_chart/bar_chart_renderer_test.mocks.dart index 48490ff23..ba3fc058d 100644 --- a/test/chart/bar_chart/bar_chart_renderer_test.mocks.dart +++ b/test/chart/bar_chart/bar_chart_renderer_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/bar_chart/bar_chart_renderer_test.dart. // Do not manually edit this file. @@ -153,6 +153,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -168,6 +169,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -176,6 +178,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -184,6 +187,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -192,6 +196,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -207,6 +212,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -222,6 +228,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -230,6 +237,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -245,6 +253,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i7.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -253,6 +262,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i7.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -261,6 +271,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i7.Float64List(0), ) as _i7.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -278,6 +289,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -291,6 +303,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -304,6 +317,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -318,6 +332,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -332,6 +347,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -347,6 +363,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -364,6 +381,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -372,6 +390,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -387,6 +406,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -402,6 +422,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -419,6 +440,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -434,6 +456,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -451,6 +474,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -472,6 +496,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -487,6 +512,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -504,6 +530,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -523,6 +550,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -542,6 +570,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -550,6 +579,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -565,6 +595,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -582,6 +613,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -599,6 +631,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -616,6 +649,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -641,6 +675,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -666,6 +701,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -703,6 +739,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#estimatedBounds), ), ) as _i2.Rect); + @override _i2.Canvas get canvas => (super.noSuchMethod( Invocation.getter(#canvas), @@ -711,6 +748,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override void paintChild( _i3.RenderObject? child, @@ -726,6 +764,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void appendLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -734,6 +773,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i2.VoidCallback addCompositionCallback(_i4.CompositionCallback? callback) => (super.noSuchMethod( @@ -743,6 +783,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValue: () {}, ) as _i2.VoidCallback); + @override void stopRecordingIfNeeded() => super.noSuchMethod( Invocation.method( @@ -751,6 +792,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setIsComplexHint() => super.noSuchMethod( Invocation.method( @@ -759,6 +801,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setWillChangeHint() => super.noSuchMethod( Invocation.method( @@ -767,6 +810,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void addLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -775,6 +819,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void pushLayer( _i4.ContainerLayer? childLayer, @@ -794,6 +839,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i3.PaintingContext createChildContext( _i4.ContainerLayer? childLayer, @@ -818,6 +864,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i3.PaintingContext); + @override _i4.ClipRectLayer? pushClipRect( bool? needsCompositing, @@ -840,6 +887,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRectLayer?); + @override _i4.ClipRRectLayer? pushClipRRect( bool? needsCompositing, @@ -864,6 +912,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRRectLayer?); + @override _i4.ClipPathLayer? pushClipPath( bool? needsCompositing, @@ -888,6 +937,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipPathLayer?); + @override _i4.ColorFilterLayer pushColorFilter( _i2.Offset? offset, @@ -918,6 +968,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.ColorFilterLayer); + @override _i4.TransformLayer? pushTransform( bool? needsCompositing, @@ -936,6 +987,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ], {#oldLayer: oldLayer}, )) as _i4.TransformLayer?); + @override _i4.OpacityLayer pushOpacity( _i2.Offset? offset, @@ -966,6 +1018,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.OpacityLayer); + @override void clipPathAndPaint( _i2.Path? path, @@ -985,6 +1038,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRRectAndPaint( _i2.RRect? rrect, @@ -1004,6 +1058,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRectAndPaint( _i2.Rect? rect, @@ -1041,16 +1096,19 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { Invocation.getter(#widget), ), ) as _i6.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i6.InheritedWidget dependOnInheritedElement( _i6.InheritedElement? ancestor, { @@ -1071,6 +1129,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i6.InheritedWidget); + @override void visitAncestorElements(_i6.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1080,6 +1139,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i6.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1088,6 +1148,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i9.Notification? notification) => super.noSuchMethod( @@ -1097,6 +1158,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override _i5.DiagnosticsNode describeElement( String? name, { @@ -1117,6 +1179,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override _i5.DiagnosticsNode describeWidget( String? name, { @@ -1137,6 +1200,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override List<_i5.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1148,6 +1212,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValue: <_i5.DiagnosticsNode>[], ) as List<_i5.DiagnosticsNode>); + @override _i5.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1190,6 +1255,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override List<_i10.GroupBarsPosition> calculateGroupAndBarsPosition( _i2.Size? viewSize, @@ -1207,6 +1273,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValue: <_i10.GroupBarsPosition>[], ) as List<_i10.GroupBarsPosition>); + @override void drawBars( _i11.CanvasWrapper? canvasWrapper, @@ -1224,6 +1291,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawTouchTooltip( _i6.BuildContext? context, @@ -1253,6 +1321,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawStackItemBorderStroke( _i11.CanvasWrapper? canvasWrapper, @@ -1280,6 +1349,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override _i13.BarTouchedSpot? handleTouch( _i2.Offset? localPosition, @@ -1294,6 +1364,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { holder, ], )) as _i13.BarTouchedSpot?); + @override void drawGrid( _i11.CanvasWrapper? canvasWrapper, @@ -1309,6 +1380,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBackground( _i11.CanvasWrapper? canvasWrapper, @@ -1324,6 +1396,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawRangeAnnotation( _i11.CanvasWrapper? canvasWrapper, @@ -1339,6 +1412,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawExtraLines( _i6.BuildContext? context, @@ -1356,6 +1430,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawHorizontalLines( _i6.BuildContext? context, @@ -1375,6 +1450,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawVerticalLines( _i6.BuildContext? context, @@ -1394,6 +1470,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValueForMissingStub: null, ); + @override double getPixelX( double? spotX, @@ -1411,6 +1488,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValue: 0.0, ) as double); + @override double getPixelY( double? spotY, @@ -1428,6 +1506,7 @@ class MockBarChartPainter extends _i1.Mock implements _i10.BarChartPainter { ), returnValue: 0.0, ) as double); + @override double getTooltipLeft( double? dx, diff --git a/test/chart/line_chart/line_chart_painter_test.mocks.dart b/test/chart/line_chart/line_chart_painter_test.mocks.dart index 36127099e..983ad17ee 100644 --- a/test/chart/line_chart/line_chart_painter_test.mocks.dart +++ b/test/chart/line_chart/line_chart_painter_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/line_chart/line_chart_painter_test.dart. // Do not manually edit this file. @@ -168,6 +168,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -183,6 +184,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -191,6 +193,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -199,6 +202,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -207,6 +211,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -222,6 +227,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -237,6 +243,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -245,6 +252,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -260,6 +268,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i5.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -268,6 +277,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i5.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -276,6 +286,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i5.Float64List(0), ) as _i5.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -293,6 +304,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -306,6 +318,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -319,6 +332,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -333,6 +347,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -347,6 +362,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -362,6 +378,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -379,6 +396,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -387,6 +405,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -402,6 +421,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -417,6 +437,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -434,6 +455,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -449,6 +471,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -466,6 +489,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -487,6 +511,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -502,6 +527,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -519,6 +545,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -538,6 +565,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -557,6 +585,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -565,6 +594,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -580,6 +610,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -597,6 +628,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -614,6 +646,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -631,6 +664,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -656,6 +690,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -681,6 +716,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -718,6 +754,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override _i2.Size get size => (super.noSuchMethod( Invocation.getter(#size), @@ -726,6 +763,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#size), ), ) as _i2.Size); + @override void drawRRect( _i2.RRect? rrect, @@ -741,6 +779,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void save() => super.noSuchMethod( Invocation.method( @@ -749,6 +788,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -757,6 +797,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipRect( _i2.Rect? rect, { @@ -774,6 +815,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void translate( double? dx, @@ -789,6 +831,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void rotate(double? radius) => super.noSuchMethod( Invocation.method( @@ -797,6 +840,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -812,6 +856,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -827,6 +872,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -835,6 +881,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -852,6 +899,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -865,6 +913,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -880,6 +929,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -897,6 +947,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? center, @@ -914,6 +965,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -935,6 +987,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawText( _i3.TextPainter? tp, @@ -952,6 +1005,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDot( _i7.FlDotPainter? painter, @@ -969,6 +1023,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRotated({ required _i2.Size? size, @@ -991,6 +1046,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDashedLine( _i2.Offset? from, @@ -1028,16 +1084,19 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { Invocation.getter(#widget), ), ) as _i3.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i3.InheritedWidget dependOnInheritedElement( _i3.InheritedElement? ancestor, { @@ -1058,6 +1117,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.InheritedWidget); + @override void visitAncestorElements(_i3.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1067,6 +1127,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i3.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1075,6 +1136,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i3.Notification? notification) => super.noSuchMethod( @@ -1084,6 +1146,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override _i3.DiagnosticsNode describeElement( String? name, { @@ -1104,6 +1167,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override _i3.DiagnosticsNode describeWidget( String? name, { @@ -1124,6 +1188,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override List<_i3.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1135,6 +1200,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValue: <_i3.DiagnosticsNode>[], ) as List<_i3.DiagnosticsNode>); + @override _i3.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1168,6 +1234,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double degrees(double? radians) => (super.noSuchMethod( Invocation.method( @@ -1176,6 +1243,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Size getDefaultSize(_i2.Size? screenSize) => (super.noSuchMethod( Invocation.method( @@ -1190,6 +1258,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Size); + @override double translateRotatedPosition( double? size, @@ -1205,6 +1274,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Offset calculateRotationOffset( _i2.Size? size, @@ -1229,6 +1299,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Offset); + @override _i3.BorderRadius? normalizeBorderRadius( _i3.BorderRadius? borderRadius, @@ -1241,6 +1312,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { width, ], )) as _i3.BorderRadius?); + @override _i3.BorderSide normalizeBorderSide( _i3.BorderSide? borderSide, @@ -1265,6 +1337,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.BorderSide); + @override double getEfficientInterval( double? axisViewSize, @@ -1282,6 +1355,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double roundInterval(double? input) => (super.noSuchMethod( Invocation.method( @@ -1290,14 +1364,34 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + + @override + int getFractionDigits(double? value) => (super.noSuchMethod( + Invocation.method( + #getFractionDigits, + [value], + ), + returnValue: 0, + ) as int); + @override - String formatNumber(double? number) => (super.noSuchMethod( + String formatNumber( + double? axisMin, + double? axisMax, + double? axisValue, + ) => + (super.noSuchMethod( Invocation.method( #formatNumber, - [number], + [ + axisMin, + axisMax, + axisValue, + ], ), returnValue: '', ) as String); + @override _i3.TextStyle getThemeAwareTextStyle( _i3.BuildContext? context, @@ -1322,6 +1416,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.TextStyle); + @override double getBestInitialIntervalValue( double? min, @@ -1341,6 +1436,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double convertRadiusToSigma(double? radius) => (super.noSuchMethod( Invocation.method( @@ -1376,6 +1472,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void clipToBorder( _i6.CanvasWrapper? canvasWrapper, @@ -1391,6 +1488,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBarLine( _i6.CanvasWrapper? canvasWrapper, @@ -1408,6 +1506,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBetweenBarsArea( _i6.CanvasWrapper? canvasWrapper, @@ -1427,6 +1526,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawDots( _i6.CanvasWrapper? canvasWrapper, @@ -1444,6 +1544,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawTouchedSpotsIndicator( _i6.CanvasWrapper? canvasWrapper, @@ -1461,6 +1562,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override _i2.Path generateBarPath( _i2.Size? viewSize, @@ -1494,6 +1596,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateNormalBarPath( _i2.Size? viewSize, @@ -1527,6 +1630,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateStepBarPath( _i2.Size? viewSize, @@ -1560,6 +1664,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateBelowBarPath( _i2.Size? viewSize, @@ -1596,6 +1701,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateAboveBarPath( _i2.Size? viewSize, @@ -1632,6 +1738,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), ), ) as _i2.Path); + @override void drawBelowBar( _i6.CanvasWrapper? canvasWrapper, @@ -1653,6 +1760,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawAboveBar( _i6.CanvasWrapper? canvasWrapper, @@ -1674,6 +1782,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBetweenBar( _i6.CanvasWrapper? canvasWrapper, @@ -1695,6 +1804,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBarShadow( _i6.CanvasWrapper? canvasWrapper, @@ -1712,6 +1822,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBar( _i6.CanvasWrapper? canvasWrapper, @@ -1731,6 +1842,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawTouchTooltip( _i3.BuildContext? context, @@ -1754,6 +1866,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override double getBarLineXLength( _i7.LineChartBarData? barData, @@ -1771,6 +1884,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValue: 0.0, ) as double); + @override List<_i7.TouchLineBarSpot>? handleTouch( _i2.Offset? localPosition, @@ -1785,6 +1899,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { holder, ], )) as List<_i7.TouchLineBarSpot>?); + @override _i7.TouchLineBarSpot? getNearestTouchedSpot( _i2.Size? viewSize, @@ -1803,6 +1918,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { holder, ], )) as _i7.TouchLineBarSpot?); + @override void drawGrid( _i6.CanvasWrapper? canvasWrapper, @@ -1818,6 +1934,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBackground( _i6.CanvasWrapper? canvasWrapper, @@ -1833,6 +1950,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawRangeAnnotation( _i6.CanvasWrapper? canvasWrapper, @@ -1848,6 +1966,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawExtraLines( _i3.BuildContext? context, @@ -1865,6 +1984,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawHorizontalLines( _i3.BuildContext? context, @@ -1884,6 +2004,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawVerticalLines( _i3.BuildContext? context, @@ -1903,6 +2024,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValueForMissingStub: null, ); + @override double getPixelX( double? spotX, @@ -1920,6 +2042,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValue: 0.0, ) as double); + @override double getPixelY( double? spotY, @@ -1937,6 +2060,7 @@ class MockLineChartPainter extends _i1.Mock implements _i9.LineChartPainter { ), returnValue: 0.0, ) as double); + @override double getTooltipLeft( double? dx, diff --git a/test/chart/line_chart/line_chart_renderer_test.mocks.dart b/test/chart/line_chart/line_chart_renderer_test.mocks.dart index 97a29906e..ac69caab3 100644 --- a/test/chart/line_chart/line_chart_renderer_test.mocks.dart +++ b/test/chart/line_chart/line_chart_renderer_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/line_chart/line_chart_renderer_test.dart. // Do not manually edit this file. @@ -163,6 +163,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -178,6 +179,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -186,6 +188,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -194,6 +197,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -202,6 +206,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -217,6 +222,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -232,6 +238,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -240,6 +247,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -255,6 +263,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i7.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -263,6 +272,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i7.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -271,6 +281,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i7.Float64List(0), ) as _i7.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -288,6 +299,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -301,6 +313,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -314,6 +327,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -328,6 +342,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -342,6 +357,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -357,6 +373,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -374,6 +391,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -382,6 +400,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -397,6 +416,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -412,6 +432,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -429,6 +450,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -444,6 +466,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -461,6 +484,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -482,6 +506,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -497,6 +522,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -514,6 +540,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -533,6 +560,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -552,6 +580,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -560,6 +589,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -575,6 +605,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -592,6 +623,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -609,6 +641,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -626,6 +659,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -651,6 +685,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -676,6 +711,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -713,6 +749,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#estimatedBounds), ), ) as _i2.Rect); + @override _i2.Canvas get canvas => (super.noSuchMethod( Invocation.getter(#canvas), @@ -721,6 +758,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override void paintChild( _i3.RenderObject? child, @@ -736,6 +774,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void appendLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -744,6 +783,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i2.VoidCallback addCompositionCallback(_i4.CompositionCallback? callback) => (super.noSuchMethod( @@ -753,6 +793,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValue: () {}, ) as _i2.VoidCallback); + @override void stopRecordingIfNeeded() => super.noSuchMethod( Invocation.method( @@ -761,6 +802,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setIsComplexHint() => super.noSuchMethod( Invocation.method( @@ -769,6 +811,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setWillChangeHint() => super.noSuchMethod( Invocation.method( @@ -777,6 +820,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void addLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -785,6 +829,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void pushLayer( _i4.ContainerLayer? childLayer, @@ -804,6 +849,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i3.PaintingContext createChildContext( _i4.ContainerLayer? childLayer, @@ -828,6 +874,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i3.PaintingContext); + @override _i4.ClipRectLayer? pushClipRect( bool? needsCompositing, @@ -850,6 +897,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRectLayer?); + @override _i4.ClipRRectLayer? pushClipRRect( bool? needsCompositing, @@ -874,6 +922,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRRectLayer?); + @override _i4.ClipPathLayer? pushClipPath( bool? needsCompositing, @@ -898,6 +947,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipPathLayer?); + @override _i4.ColorFilterLayer pushColorFilter( _i2.Offset? offset, @@ -928,6 +978,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.ColorFilterLayer); + @override _i4.TransformLayer? pushTransform( bool? needsCompositing, @@ -946,6 +997,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ], {#oldLayer: oldLayer}, )) as _i4.TransformLayer?); + @override _i4.OpacityLayer pushOpacity( _i2.Offset? offset, @@ -976,6 +1028,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.OpacityLayer); + @override void clipPathAndPaint( _i2.Path? path, @@ -995,6 +1048,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRRectAndPaint( _i2.RRect? rrect, @@ -1014,6 +1068,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRectAndPaint( _i2.Rect? rect, @@ -1051,16 +1106,19 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { Invocation.getter(#widget), ), ) as _i6.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i6.InheritedWidget dependOnInheritedElement( _i6.InheritedElement? ancestor, { @@ -1081,6 +1139,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i6.InheritedWidget); + @override void visitAncestorElements(_i6.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1090,6 +1149,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i6.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1098,6 +1158,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i9.Notification? notification) => super.noSuchMethod( @@ -1107,6 +1168,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override _i5.DiagnosticsNode describeElement( String? name, { @@ -1127,6 +1189,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override _i5.DiagnosticsNode describeWidget( String? name, { @@ -1147,6 +1210,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override List<_i5.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1158,6 +1222,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValue: <_i5.DiagnosticsNode>[], ) as List<_i5.DiagnosticsNode>); + @override _i5.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1200,6 +1265,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void clipToBorder( _i11.CanvasWrapper? canvasWrapper, @@ -1215,6 +1281,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBarLine( _i11.CanvasWrapper? canvasWrapper, @@ -1232,6 +1299,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBetweenBarsArea( _i11.CanvasWrapper? canvasWrapper, @@ -1251,6 +1319,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawDots( _i11.CanvasWrapper? canvasWrapper, @@ -1268,6 +1337,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawTouchedSpotsIndicator( _i11.CanvasWrapper? canvasWrapper, @@ -1285,6 +1355,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override _i2.Path generateBarPath( _i2.Size? viewSize, @@ -1318,6 +1389,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateNormalBarPath( _i2.Size? viewSize, @@ -1351,6 +1423,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateStepBarPath( _i2.Size? viewSize, @@ -1384,6 +1457,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateBelowBarPath( _i2.Size? viewSize, @@ -1420,6 +1494,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), ), ) as _i2.Path); + @override _i2.Path generateAboveBarPath( _i2.Size? viewSize, @@ -1456,6 +1531,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), ), ) as _i2.Path); + @override void drawBelowBar( _i11.CanvasWrapper? canvasWrapper, @@ -1477,6 +1553,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawAboveBar( _i11.CanvasWrapper? canvasWrapper, @@ -1498,6 +1575,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBetweenBar( _i11.CanvasWrapper? canvasWrapper, @@ -1519,6 +1597,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBarShadow( _i11.CanvasWrapper? canvasWrapper, @@ -1536,6 +1615,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBar( _i11.CanvasWrapper? canvasWrapper, @@ -1555,6 +1635,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawTouchTooltip( _i6.BuildContext? context, @@ -1578,6 +1659,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override double getBarLineXLength( _i13.LineChartBarData? barData, @@ -1595,6 +1677,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValue: 0.0, ) as double); + @override List<_i13.TouchLineBarSpot>? handleTouch( _i2.Offset? localPosition, @@ -1609,6 +1692,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { holder, ], )) as List<_i13.TouchLineBarSpot>?); + @override _i13.TouchLineBarSpot? getNearestTouchedSpot( _i2.Size? viewSize, @@ -1627,6 +1711,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { holder, ], )) as _i13.TouchLineBarSpot?); + @override void drawGrid( _i11.CanvasWrapper? canvasWrapper, @@ -1642,6 +1727,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawBackground( _i11.CanvasWrapper? canvasWrapper, @@ -1657,6 +1743,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawRangeAnnotation( _i11.CanvasWrapper? canvasWrapper, @@ -1672,6 +1759,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawExtraLines( _i6.BuildContext? context, @@ -1689,6 +1777,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawHorizontalLines( _i6.BuildContext? context, @@ -1708,6 +1797,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override void drawVerticalLines( _i6.BuildContext? context, @@ -1727,6 +1817,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValueForMissingStub: null, ); + @override double getPixelX( double? spotX, @@ -1744,6 +1835,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValue: 0.0, ) as double); + @override double getPixelY( double? spotY, @@ -1761,6 +1853,7 @@ class MockLineChartPainter extends _i1.Mock implements _i10.LineChartPainter { ), returnValue: 0.0, ) as double); + @override double getTooltipLeft( double? dx, diff --git a/test/chart/pie_chart/pie_chart_painter_test.mocks.dart b/test/chart/pie_chart/pie_chart_painter_test.mocks.dart index a1d0683e1..d469bbdca 100644 --- a/test/chart/pie_chart/pie_chart_painter_test.mocks.dart +++ b/test/chart/pie_chart/pie_chart_painter_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/pie_chart/pie_chart_painter_test.dart. // Do not manually edit this file. @@ -155,6 +155,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -170,6 +171,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -178,6 +180,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -186,6 +189,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -194,6 +198,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -209,6 +214,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -224,6 +230,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -232,6 +239,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -247,6 +255,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i5.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -255,6 +264,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i5.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -263,6 +273,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i5.Float64List(0), ) as _i5.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -280,6 +291,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -293,6 +305,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -306,6 +319,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -320,6 +334,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -334,6 +349,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -349,6 +365,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -366,6 +383,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -374,6 +392,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -389,6 +408,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -404,6 +424,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -421,6 +442,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -436,6 +458,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -453,6 +476,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -474,6 +498,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -489,6 +514,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -506,6 +532,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -525,6 +552,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -544,6 +572,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -552,6 +581,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -567,6 +597,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -584,6 +615,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -601,6 +633,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -618,6 +651,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -643,6 +677,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -668,6 +703,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -705,6 +741,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override _i2.Size get size => (super.noSuchMethod( Invocation.getter(#size), @@ -713,6 +750,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#size), ), ) as _i2.Size); + @override void drawRRect( _i2.RRect? rrect, @@ -728,6 +766,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void save() => super.noSuchMethod( Invocation.method( @@ -736,6 +775,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -744,6 +784,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipRect( _i2.Rect? rect, { @@ -761,6 +802,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void translate( double? dx, @@ -776,6 +818,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void rotate(double? radius) => super.noSuchMethod( Invocation.method( @@ -784,6 +827,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -799,6 +843,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -814,6 +859,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -822,6 +868,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -839,6 +886,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -852,6 +900,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -867,6 +916,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -884,6 +934,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? center, @@ -901,6 +952,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -922,6 +974,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawText( _i3.TextPainter? tp, @@ -939,6 +992,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDot( _i7.FlDotPainter? painter, @@ -956,6 +1010,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRotated({ required _i2.Size? size, @@ -978,6 +1033,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDashedLine( _i2.Offset? from, @@ -1015,16 +1071,19 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { Invocation.getter(#widget), ), ) as _i3.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i3.InheritedWidget dependOnInheritedElement( _i3.InheritedElement? ancestor, { @@ -1045,6 +1104,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.InheritedWidget); + @override void visitAncestorElements(_i3.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1054,6 +1114,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i3.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1062,6 +1123,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i3.Notification? notification) => super.noSuchMethod( @@ -1071,6 +1133,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override _i3.DiagnosticsNode describeElement( String? name, { @@ -1091,6 +1154,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override _i3.DiagnosticsNode describeWidget( String? name, { @@ -1111,6 +1175,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override List<_i3.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1122,6 +1187,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValue: <_i3.DiagnosticsNode>[], ) as List<_i3.DiagnosticsNode>); + @override _i3.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1155,6 +1221,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double degrees(double? radians) => (super.noSuchMethod( Invocation.method( @@ -1163,6 +1230,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Size getDefaultSize(_i2.Size? screenSize) => (super.noSuchMethod( Invocation.method( @@ -1177,6 +1245,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Size); + @override double translateRotatedPosition( double? size, @@ -1192,6 +1261,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Offset calculateRotationOffset( _i2.Size? size, @@ -1216,6 +1286,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Offset); + @override _i3.BorderRadius? normalizeBorderRadius( _i3.BorderRadius? borderRadius, @@ -1228,6 +1299,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { width, ], )) as _i3.BorderRadius?); + @override _i3.BorderSide normalizeBorderSide( _i3.BorderSide? borderSide, @@ -1252,6 +1324,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.BorderSide); + @override double getEfficientInterval( double? axisViewSize, @@ -1269,6 +1342,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double roundInterval(double? input) => (super.noSuchMethod( Invocation.method( @@ -1277,14 +1351,34 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + + @override + int getFractionDigits(double? value) => (super.noSuchMethod( + Invocation.method( + #getFractionDigits, + [value], + ), + returnValue: 0, + ) as int); + @override - String formatNumber(double? number) => (super.noSuchMethod( + String formatNumber( + double? axisMin, + double? axisMax, + double? axisValue, + ) => + (super.noSuchMethod( Invocation.method( #formatNumber, - [number], + [ + axisMin, + axisMax, + axisValue, + ], ), returnValue: '', ) as String); + @override _i3.TextStyle getThemeAwareTextStyle( _i3.BuildContext? context, @@ -1309,6 +1403,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.TextStyle); + @override double getBestInitialIntervalValue( double? min, @@ -1328,6 +1423,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double convertRadiusToSigma(double? radius) => (super.noSuchMethod( Invocation.method( diff --git a/test/chart/pie_chart/pie_chart_renderer_test.mocks.dart b/test/chart/pie_chart/pie_chart_renderer_test.mocks.dart index 8e58b42b5..3cfce1762 100644 --- a/test/chart/pie_chart/pie_chart_renderer_test.mocks.dart +++ b/test/chart/pie_chart/pie_chart_renderer_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/pie_chart/pie_chart_renderer_test.dart. // Do not manually edit this file. @@ -175,6 +175,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -190,6 +191,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -198,6 +200,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -206,6 +209,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -214,6 +218,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -229,6 +234,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -244,6 +250,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -252,6 +259,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -267,6 +275,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i8.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -275,6 +284,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i8.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -283,6 +293,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i8.Float64List(0), ) as _i8.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -300,6 +311,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -313,6 +325,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -326,6 +339,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -340,6 +354,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -354,6 +369,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -369,6 +385,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -386,6 +403,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -394,6 +412,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -409,6 +428,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -424,6 +444,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -441,6 +462,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -456,6 +478,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -473,6 +496,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -494,6 +518,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -509,6 +534,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -526,6 +552,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -545,6 +572,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -564,6 +592,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -572,6 +601,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -587,6 +617,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -604,6 +635,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -621,6 +653,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -638,6 +671,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -663,6 +697,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -688,6 +723,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -725,6 +761,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#estimatedBounds), ), ) as _i2.Rect); + @override _i2.Canvas get canvas => (super.noSuchMethod( Invocation.getter(#canvas), @@ -733,6 +770,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override void paintChild( _i3.RenderObject? child, @@ -748,6 +786,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void appendLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -756,6 +795,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i2.VoidCallback addCompositionCallback(_i4.CompositionCallback? callback) => (super.noSuchMethod( @@ -765,6 +805,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValue: () {}, ) as _i2.VoidCallback); + @override void stopRecordingIfNeeded() => super.noSuchMethod( Invocation.method( @@ -773,6 +814,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setIsComplexHint() => super.noSuchMethod( Invocation.method( @@ -781,6 +823,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setWillChangeHint() => super.noSuchMethod( Invocation.method( @@ -789,6 +832,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void addLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -797,6 +841,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void pushLayer( _i4.ContainerLayer? childLayer, @@ -816,6 +861,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i3.PaintingContext createChildContext( _i4.ContainerLayer? childLayer, @@ -840,6 +886,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i3.PaintingContext); + @override _i4.ClipRectLayer? pushClipRect( bool? needsCompositing, @@ -862,6 +909,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRectLayer?); + @override _i4.ClipRRectLayer? pushClipRRect( bool? needsCompositing, @@ -886,6 +934,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRRectLayer?); + @override _i4.ClipPathLayer? pushClipPath( bool? needsCompositing, @@ -910,6 +959,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipPathLayer?); + @override _i4.ColorFilterLayer pushColorFilter( _i2.Offset? offset, @@ -940,6 +990,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.ColorFilterLayer); + @override _i4.TransformLayer? pushTransform( bool? needsCompositing, @@ -958,6 +1009,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ], {#oldLayer: oldLayer}, )) as _i4.TransformLayer?); + @override _i4.OpacityLayer pushOpacity( _i2.Offset? offset, @@ -988,6 +1040,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.OpacityLayer); + @override void clipPathAndPaint( _i2.Path? path, @@ -1007,6 +1060,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRRectAndPaint( _i2.RRect? rrect, @@ -1026,6 +1080,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRectAndPaint( _i2.Rect? rect, @@ -1063,16 +1118,19 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { Invocation.getter(#widget), ), ) as _i6.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i6.InheritedWidget dependOnInheritedElement( _i6.InheritedElement? ancestor, { @@ -1093,6 +1151,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i6.InheritedWidget); + @override void visitAncestorElements(_i6.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1102,6 +1161,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i6.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1110,6 +1170,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i10.Notification? notification) => super.noSuchMethod( @@ -1119,6 +1180,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override _i5.DiagnosticsNode describeElement( String? name, { @@ -1139,6 +1201,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override _i5.DiagnosticsNode describeWidget( String? name, { @@ -1159,6 +1222,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override List<_i5.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1170,6 +1234,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValue: <_i5.DiagnosticsNode>[], ) as List<_i5.DiagnosticsNode>); + @override _i5.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1212,6 +1277,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValueForMissingStub: null, ); + @override List calculateSectionsAngle( List<_i7.PieChartSectionData>? sections, @@ -1227,6 +1293,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValue: [], ) as List); + @override void drawCenterSpace( _i12.CanvasWrapper? canvasWrapper, @@ -1244,6 +1311,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValueForMissingStub: null, ); + @override void drawSections( _i12.CanvasWrapper? canvasWrapper, @@ -1263,6 +1331,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValueForMissingStub: null, ); + @override _i2.Path generateSectionPath( _i7.PieChartSectionData? section, @@ -1299,6 +1368,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), ), ) as _i2.Path); + @override _i2.Path createRectPathAroundLine( _i14.Line? line, @@ -1323,6 +1393,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), ), ) as _i2.Path); + @override void drawSection( _i7.PieChartSectionData? section, @@ -1340,6 +1411,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValueForMissingStub: null, ); + @override void drawSectionStroke( _i7.PieChartSectionData? section, @@ -1359,6 +1431,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValueForMissingStub: null, ); + @override void drawTexts( _i6.BuildContext? context, @@ -1378,6 +1451,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValueForMissingStub: null, ); + @override double calculateCenterRadius( _i2.Size? viewSize, @@ -1393,6 +1467,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), returnValue: 0.0, ) as double); + @override _i7.PieTouchedSection handleTouch( _i2.Offset? localPosition, @@ -1420,6 +1495,7 @@ class MockPieChartPainter extends _i1.Mock implements _i11.PieChartPainter { ), ), ) as _i7.PieTouchedSection); + @override Map getBadgeOffsets( _i2.Size? viewSize, diff --git a/test/chart/radar_chart/radar_chart_painter_test.mocks.dart b/test/chart/radar_chart/radar_chart_painter_test.mocks.dart index 84b2cd6ef..6e7673931 100644 --- a/test/chart/radar_chart/radar_chart_painter_test.mocks.dart +++ b/test/chart/radar_chart/radar_chart_painter_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/radar_chart/radar_chart_painter_test.dart. // Do not manually edit this file. @@ -155,6 +155,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -170,6 +171,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -178,6 +180,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -186,6 +189,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -194,6 +198,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -209,6 +214,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -224,6 +230,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -232,6 +239,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -247,6 +255,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i5.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -255,6 +264,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i5.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -263,6 +273,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i5.Float64List(0), ) as _i5.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -280,6 +291,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -293,6 +305,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -306,6 +319,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -320,6 +334,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -334,6 +349,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -349,6 +365,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -366,6 +383,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -374,6 +392,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -389,6 +408,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -404,6 +424,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -421,6 +442,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -436,6 +458,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -453,6 +476,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -474,6 +498,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -489,6 +514,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -506,6 +532,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -525,6 +552,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -544,6 +572,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -552,6 +581,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -567,6 +597,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -584,6 +615,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -601,6 +633,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -618,6 +651,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -643,6 +677,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -668,6 +703,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -705,6 +741,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override _i2.Size get size => (super.noSuchMethod( Invocation.getter(#size), @@ -713,6 +750,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#size), ), ) as _i2.Size); + @override void drawRRect( _i2.RRect? rrect, @@ -728,6 +766,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void save() => super.noSuchMethod( Invocation.method( @@ -736,6 +775,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -744,6 +784,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipRect( _i2.Rect? rect, { @@ -761,6 +802,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void translate( double? dx, @@ -776,6 +818,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void rotate(double? radius) => super.noSuchMethod( Invocation.method( @@ -784,6 +827,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -799,6 +843,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -814,6 +859,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -822,6 +868,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -839,6 +886,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -852,6 +900,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -867,6 +916,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -884,6 +934,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? center, @@ -901,6 +952,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -922,6 +974,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawText( _i3.TextPainter? tp, @@ -939,6 +992,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDot( _i7.FlDotPainter? painter, @@ -956,6 +1010,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRotated({ required _i2.Size? size, @@ -978,6 +1033,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDashedLine( _i2.Offset? from, @@ -1015,16 +1071,19 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { Invocation.getter(#widget), ), ) as _i3.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i3.InheritedWidget dependOnInheritedElement( _i3.InheritedElement? ancestor, { @@ -1045,6 +1104,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.InheritedWidget); + @override void visitAncestorElements(_i3.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1054,6 +1114,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i3.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1062,6 +1123,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i3.Notification? notification) => super.noSuchMethod( @@ -1071,6 +1133,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override _i3.DiagnosticsNode describeElement( String? name, { @@ -1091,6 +1154,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override _i3.DiagnosticsNode describeWidget( String? name, { @@ -1111,6 +1175,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override List<_i3.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1122,6 +1187,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValue: <_i3.DiagnosticsNode>[], ) as List<_i3.DiagnosticsNode>); + @override _i3.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1155,6 +1221,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double degrees(double? radians) => (super.noSuchMethod( Invocation.method( @@ -1163,6 +1230,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Size getDefaultSize(_i2.Size? screenSize) => (super.noSuchMethod( Invocation.method( @@ -1177,6 +1245,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Size); + @override double translateRotatedPosition( double? size, @@ -1192,6 +1261,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Offset calculateRotationOffset( _i2.Size? size, @@ -1216,6 +1286,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Offset); + @override _i3.BorderRadius? normalizeBorderRadius( _i3.BorderRadius? borderRadius, @@ -1228,6 +1299,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { width, ], )) as _i3.BorderRadius?); + @override _i3.BorderSide normalizeBorderSide( _i3.BorderSide? borderSide, @@ -1252,6 +1324,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.BorderSide); + @override double getEfficientInterval( double? axisViewSize, @@ -1269,6 +1342,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double roundInterval(double? input) => (super.noSuchMethod( Invocation.method( @@ -1277,14 +1351,34 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + + @override + int getFractionDigits(double? value) => (super.noSuchMethod( + Invocation.method( + #getFractionDigits, + [value], + ), + returnValue: 0, + ) as int); + @override - String formatNumber(double? number) => (super.noSuchMethod( + String formatNumber( + double? axisMin, + double? axisMax, + double? axisValue, + ) => + (super.noSuchMethod( Invocation.method( #formatNumber, - [number], + [ + axisMin, + axisMax, + axisValue, + ], ), returnValue: '', ) as String); + @override _i3.TextStyle getThemeAwareTextStyle( _i3.BuildContext? context, @@ -1309,6 +1403,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.TextStyle); + @override double getBestInitialIntervalValue( double? min, @@ -1328,6 +1423,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double convertRadiusToSigma(double? radius) => (super.noSuchMethod( Invocation.method( diff --git a/test/chart/radar_chart/radar_chart_renderer_test.mocks.dart b/test/chart/radar_chart/radar_chart_renderer_test.mocks.dart index 13ac05859..a176f281b 100644 --- a/test/chart/radar_chart/radar_chart_renderer_test.mocks.dart +++ b/test/chart/radar_chart/radar_chart_renderer_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/radar_chart/radar_chart_renderer_test.dart. // Do not manually edit this file. @@ -154,6 +154,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -169,6 +170,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -177,6 +179,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -185,6 +188,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -193,6 +197,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -208,6 +213,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -223,6 +229,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -231,6 +238,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -246,6 +254,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i7.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -254,6 +263,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i7.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -262,6 +272,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i7.Float64List(0), ) as _i7.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -279,6 +290,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -292,6 +304,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -305,6 +318,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -319,6 +333,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -333,6 +348,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -348,6 +364,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -365,6 +382,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -373,6 +391,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -388,6 +407,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -403,6 +423,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -420,6 +441,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -435,6 +457,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -452,6 +475,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -473,6 +497,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -488,6 +513,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -505,6 +531,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -524,6 +551,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -543,6 +571,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -551,6 +580,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -566,6 +596,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -583,6 +614,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -600,6 +632,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -617,6 +650,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -642,6 +676,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -667,6 +702,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -704,6 +740,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#estimatedBounds), ), ) as _i2.Rect); + @override _i2.Canvas get canvas => (super.noSuchMethod( Invocation.getter(#canvas), @@ -712,6 +749,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override void paintChild( _i3.RenderObject? child, @@ -727,6 +765,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void appendLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -735,6 +774,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i2.VoidCallback addCompositionCallback(_i4.CompositionCallback? callback) => (super.noSuchMethod( @@ -744,6 +784,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValue: () {}, ) as _i2.VoidCallback); + @override void stopRecordingIfNeeded() => super.noSuchMethod( Invocation.method( @@ -752,6 +793,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setIsComplexHint() => super.noSuchMethod( Invocation.method( @@ -760,6 +802,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setWillChangeHint() => super.noSuchMethod( Invocation.method( @@ -768,6 +811,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void addLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -776,6 +820,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void pushLayer( _i4.ContainerLayer? childLayer, @@ -795,6 +840,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i3.PaintingContext createChildContext( _i4.ContainerLayer? childLayer, @@ -819,6 +865,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i3.PaintingContext); + @override _i4.ClipRectLayer? pushClipRect( bool? needsCompositing, @@ -841,6 +888,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRectLayer?); + @override _i4.ClipRRectLayer? pushClipRRect( bool? needsCompositing, @@ -865,6 +913,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRRectLayer?); + @override _i4.ClipPathLayer? pushClipPath( bool? needsCompositing, @@ -889,6 +938,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipPathLayer?); + @override _i4.ColorFilterLayer pushColorFilter( _i2.Offset? offset, @@ -919,6 +969,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.ColorFilterLayer); + @override _i4.TransformLayer? pushTransform( bool? needsCompositing, @@ -937,6 +988,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ], {#oldLayer: oldLayer}, )) as _i4.TransformLayer?); + @override _i4.OpacityLayer pushOpacity( _i2.Offset? offset, @@ -967,6 +1019,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.OpacityLayer); + @override void clipPathAndPaint( _i2.Path? path, @@ -986,6 +1039,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRRectAndPaint( _i2.RRect? rrect, @@ -1005,6 +1059,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRectAndPaint( _i2.Rect? rect, @@ -1042,16 +1097,19 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { Invocation.getter(#widget), ), ) as _i6.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i6.InheritedWidget dependOnInheritedElement( _i6.InheritedElement? ancestor, { @@ -1072,6 +1130,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i6.InheritedWidget); + @override void visitAncestorElements(_i6.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1081,6 +1140,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i6.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1089,6 +1149,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i9.Notification? notification) => super.noSuchMethod( @@ -1098,6 +1159,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override _i5.DiagnosticsNode describeElement( String? name, { @@ -1118,6 +1180,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override _i5.DiagnosticsNode describeWidget( String? name, { @@ -1138,6 +1201,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override List<_i5.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1149,6 +1213,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValue: <_i5.DiagnosticsNode>[], ) as List<_i5.DiagnosticsNode>); + @override _i5.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1183,6 +1248,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValueForMissingStub: null, ); + @override void paint( _i6.BuildContext? context, @@ -1200,6 +1266,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValueForMissingStub: null, ); + @override double getDefaultChartCenterValue() => (super.noSuchMethod( Invocation.method( @@ -1208,6 +1275,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override double getChartCenterValue(_i13.RadarChartData? data) => (super.noSuchMethod( Invocation.method( @@ -1216,6 +1284,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override double getScaledPoint( _i13.RadarEntry? point, @@ -1233,6 +1302,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override double getFirstTickValue(_i13.RadarChartData? data) => (super.noSuchMethod( Invocation.method( @@ -1241,6 +1311,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override double getSpaceBetweenTicks(_i13.RadarChartData? data) => (super.noSuchMethod( Invocation.method( @@ -1249,6 +1320,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override void drawTicks( _i6.BuildContext? context, @@ -1266,6 +1338,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawGrids( _i11.CanvasWrapper? canvasWrapper, @@ -1281,6 +1354,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawTitles( _i6.BuildContext? context, @@ -1298,6 +1372,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValueForMissingStub: null, ); + @override void drawDataSets( _i11.CanvasWrapper? canvasWrapper, @@ -1313,6 +1388,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValueForMissingStub: null, ); + @override _i13.RadarTouchedSpot? handleTouch( _i2.Offset? touchedPoint, @@ -1327,6 +1403,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { holder, ], )) as _i13.RadarTouchedSpot?); + @override double radarCenterY(_i2.Size? size) => (super.noSuchMethod( Invocation.method( @@ -1335,6 +1412,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override double radarCenterX(_i2.Size? size) => (super.noSuchMethod( Invocation.method( @@ -1343,6 +1421,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override double radarRadius(_i2.Size? size) => (super.noSuchMethod( Invocation.method( @@ -1351,6 +1430,7 @@ class MockRadarChartPainter extends _i1.Mock implements _i10.RadarChartPainter { ), returnValue: 0.0, ) as double); + @override List<_i10.RadarDataSetsPosition> calculateDataSetsPosition( _i2.Size? viewSize, diff --git a/test/chart/scatter_chart/scatter_chart_painter_test.mocks.dart b/test/chart/scatter_chart/scatter_chart_painter_test.mocks.dart index 3305195d0..f8e87a9b0 100644 --- a/test/chart/scatter_chart/scatter_chart_painter_test.mocks.dart +++ b/test/chart/scatter_chart/scatter_chart_painter_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/scatter_chart/scatter_chart_painter_test.dart. // Do not manually edit this file. @@ -155,6 +155,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -170,6 +171,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -178,6 +180,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -186,6 +189,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -194,6 +198,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -209,6 +214,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -224,6 +230,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -232,6 +239,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -247,6 +255,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i5.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -255,6 +264,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i5.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -263,6 +273,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i5.Float64List(0), ) as _i5.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -280,6 +291,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -293,6 +305,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -306,6 +319,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -320,6 +334,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -334,6 +349,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -349,6 +365,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -366,6 +383,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -374,6 +392,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -389,6 +408,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -404,6 +424,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -421,6 +442,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -436,6 +458,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -453,6 +476,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -474,6 +498,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -489,6 +514,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -506,6 +532,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -525,6 +552,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -544,6 +572,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -552,6 +581,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -567,6 +597,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -584,6 +615,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -601,6 +633,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -618,6 +651,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -643,6 +677,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -668,6 +703,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -705,6 +741,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override _i2.Size get size => (super.noSuchMethod( Invocation.getter(#size), @@ -713,6 +750,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { Invocation.getter(#size), ), ) as _i2.Size); + @override void drawRRect( _i2.RRect? rrect, @@ -728,6 +766,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void save() => super.noSuchMethod( Invocation.method( @@ -736,6 +775,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -744,6 +784,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipRect( _i2.Rect? rect, { @@ -761,6 +802,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void translate( double? dx, @@ -776,6 +818,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void rotate(double? radius) => super.noSuchMethod( Invocation.method( @@ -784,6 +827,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -799,6 +843,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -814,6 +859,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -822,6 +868,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -839,6 +886,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -852,6 +900,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -867,6 +916,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -884,6 +934,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? center, @@ -901,6 +952,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -922,6 +974,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawText( _i3.TextPainter? tp, @@ -939,6 +992,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDot( _i7.FlDotPainter? painter, @@ -956,6 +1010,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawRotated({ required _i2.Size? size, @@ -978,6 +1033,7 @@ class MockCanvasWrapper extends _i1.Mock implements _i6.CanvasWrapper { ), returnValueForMissingStub: null, ); + @override void drawDashedLine( _i2.Offset? from, @@ -1015,16 +1071,19 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { Invocation.getter(#widget), ), ) as _i3.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i3.InheritedWidget dependOnInheritedElement( _i3.InheritedElement? ancestor, { @@ -1045,6 +1104,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.InheritedWidget); + @override void visitAncestorElements(_i3.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1054,6 +1114,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i3.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1062,6 +1123,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i3.Notification? notification) => super.noSuchMethod( @@ -1071,6 +1133,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override _i3.DiagnosticsNode describeElement( String? name, { @@ -1091,6 +1154,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override _i3.DiagnosticsNode describeWidget( String? name, { @@ -1111,6 +1175,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override List<_i3.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1122,6 +1187,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValue: <_i3.DiagnosticsNode>[], ) as List<_i3.DiagnosticsNode>); + @override _i3.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1155,6 +1221,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double degrees(double? radians) => (super.noSuchMethod( Invocation.method( @@ -1163,6 +1230,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Size getDefaultSize(_i2.Size? screenSize) => (super.noSuchMethod( Invocation.method( @@ -1177,6 +1245,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Size); + @override double translateRotatedPosition( double? size, @@ -1192,6 +1261,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Offset calculateRotationOffset( _i2.Size? size, @@ -1216,6 +1286,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i2.Offset); + @override _i3.BorderRadius? normalizeBorderRadius( _i3.BorderRadius? borderRadius, @@ -1228,6 +1299,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { width, ], )) as _i3.BorderRadius?); + @override _i3.BorderSide normalizeBorderSide( _i3.BorderSide? borderSide, @@ -1252,6 +1324,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.BorderSide); + @override double getEfficientInterval( double? axisViewSize, @@ -1269,6 +1342,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double roundInterval(double? input) => (super.noSuchMethod( Invocation.method( @@ -1277,14 +1351,34 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + + @override + int getFractionDigits(double? value) => (super.noSuchMethod( + Invocation.method( + #getFractionDigits, + [value], + ), + returnValue: 0, + ) as int); + @override - String formatNumber(double? number) => (super.noSuchMethod( + String formatNumber( + double? axisMin, + double? axisMax, + double? axisValue, + ) => + (super.noSuchMethod( Invocation.method( #formatNumber, - [number], + [ + axisMin, + axisMax, + axisValue, + ], ), returnValue: '', ) as String); + @override _i3.TextStyle getThemeAwareTextStyle( _i3.BuildContext? context, @@ -1309,6 +1403,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), ), ) as _i3.TextStyle); + @override double getBestInitialIntervalValue( double? min, @@ -1328,6 +1423,7 @@ class MockUtils extends _i1.Mock implements _i8.Utils { ), returnValue: 0.0, ) as double); + @override double convertRadiusToSigma(double? radius) => (super.noSuchMethod( Invocation.method( diff --git a/test/chart/scatter_chart/scatter_chart_renderer_test.mocks.dart b/test/chart/scatter_chart/scatter_chart_renderer_test.mocks.dart index 890e683be..56fd25da9 100644 --- a/test/chart/scatter_chart/scatter_chart_renderer_test.mocks.dart +++ b/test/chart/scatter_chart/scatter_chart_renderer_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/chart/scatter_chart/scatter_chart_renderer_test.dart. // Do not manually edit this file. @@ -154,6 +154,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -169,6 +170,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -177,6 +179,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -185,6 +188,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -193,6 +197,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -208,6 +213,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -223,6 +229,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -231,6 +238,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -246,6 +254,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i7.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -254,6 +263,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i7.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -262,6 +272,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i7.Float64List(0), ) as _i7.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -279,6 +290,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -292,6 +304,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -305,6 +318,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -319,6 +333,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -333,6 +348,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -348,6 +364,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -365,6 +382,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -373,6 +391,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -388,6 +407,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -403,6 +423,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -420,6 +441,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -435,6 +457,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -452,6 +475,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -473,6 +497,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -488,6 +513,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -505,6 +531,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -524,6 +551,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -543,6 +571,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -551,6 +580,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -566,6 +596,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -583,6 +614,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -600,6 +632,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -617,6 +650,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -642,6 +676,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -667,6 +702,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -704,6 +740,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#estimatedBounds), ), ) as _i2.Rect); + @override _i2.Canvas get canvas => (super.noSuchMethod( Invocation.getter(#canvas), @@ -712,6 +749,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { Invocation.getter(#canvas), ), ) as _i2.Canvas); + @override void paintChild( _i3.RenderObject? child, @@ -727,6 +765,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void appendLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -735,6 +774,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i2.VoidCallback addCompositionCallback(_i4.CompositionCallback? callback) => (super.noSuchMethod( @@ -744,6 +784,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValue: () {}, ) as _i2.VoidCallback); + @override void stopRecordingIfNeeded() => super.noSuchMethod( Invocation.method( @@ -752,6 +793,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setIsComplexHint() => super.noSuchMethod( Invocation.method( @@ -760,6 +802,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void setWillChangeHint() => super.noSuchMethod( Invocation.method( @@ -768,6 +811,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void addLayer(_i4.Layer? layer) => super.noSuchMethod( Invocation.method( @@ -776,6 +820,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void pushLayer( _i4.ContainerLayer? childLayer, @@ -795,6 +840,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override _i3.PaintingContext createChildContext( _i4.ContainerLayer? childLayer, @@ -819,6 +865,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i3.PaintingContext); + @override _i4.ClipRectLayer? pushClipRect( bool? needsCompositing, @@ -841,6 +888,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRectLayer?); + @override _i4.ClipRRectLayer? pushClipRRect( bool? needsCompositing, @@ -865,6 +913,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipRRectLayer?); + @override _i4.ClipPathLayer? pushClipPath( bool? needsCompositing, @@ -889,6 +938,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { #oldLayer: oldLayer, }, )) as _i4.ClipPathLayer?); + @override _i4.ColorFilterLayer pushColorFilter( _i2.Offset? offset, @@ -919,6 +969,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.ColorFilterLayer); + @override _i4.TransformLayer? pushTransform( bool? needsCompositing, @@ -937,6 +988,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ], {#oldLayer: oldLayer}, )) as _i4.TransformLayer?); + @override _i4.OpacityLayer pushOpacity( _i2.Offset? offset, @@ -967,6 +1019,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), ), ) as _i4.OpacityLayer); + @override void clipPathAndPaint( _i2.Path? path, @@ -986,6 +1039,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRRectAndPaint( _i2.RRect? rrect, @@ -1005,6 +1059,7 @@ class MockPaintingContext extends _i1.Mock implements _i3.PaintingContext { ), returnValueForMissingStub: null, ); + @override void clipRectAndPaint( _i2.Rect? rect, @@ -1042,16 +1097,19 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { Invocation.getter(#widget), ), ) as _i6.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i6.InheritedWidget dependOnInheritedElement( _i6.InheritedElement? ancestor, { @@ -1072,6 +1130,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i6.InheritedWidget); + @override void visitAncestorElements(_i6.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -1081,6 +1140,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i6.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -1089,6 +1149,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i9.Notification? notification) => super.noSuchMethod( @@ -1098,6 +1159,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValueForMissingStub: null, ); + @override _i5.DiagnosticsNode describeElement( String? name, { @@ -1118,6 +1180,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override _i5.DiagnosticsNode describeWidget( String? name, { @@ -1138,6 +1201,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), ), ) as _i5.DiagnosticsNode); + @override List<_i5.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -1149,6 +1213,7 @@ class MockBuildContext extends _i1.Mock implements _i6.BuildContext { ), returnValue: <_i5.DiagnosticsNode>[], ) as List<_i5.DiagnosticsNode>); + @override _i5.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( @@ -1192,6 +1257,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawSpots( _i6.BuildContext? context, @@ -1209,6 +1275,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawTouchTooltips( _i6.BuildContext? context, @@ -1226,6 +1293,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawTouchTooltip( _i6.BuildContext? context, @@ -1247,6 +1315,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i13.ScatterTouchedSpot? handleTouch( _i2.Offset? localPosition, @@ -1261,6 +1330,7 @@ class MockScatterChartPainter extends _i1.Mock holder, ], )) as _i13.ScatterTouchedSpot?); + @override void drawGrid( _i11.CanvasWrapper? canvasWrapper, @@ -1276,6 +1346,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawBackground( _i11.CanvasWrapper? canvasWrapper, @@ -1291,6 +1362,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawRangeAnnotation( _i11.CanvasWrapper? canvasWrapper, @@ -1306,6 +1378,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawExtraLines( _i6.BuildContext? context, @@ -1323,6 +1396,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawHorizontalLines( _i6.BuildContext? context, @@ -1342,6 +1416,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void drawVerticalLines( _i6.BuildContext? context, @@ -1361,6 +1436,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValueForMissingStub: null, ); + @override double getPixelX( double? spotX, @@ -1378,6 +1454,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValue: 0.0, ) as double); + @override double getPixelY( double? spotY, @@ -1395,6 +1472,7 @@ class MockScatterChartPainter extends _i1.Mock ), returnValue: 0.0, ) as double); + @override double getTooltipLeft( double? dx, diff --git a/test/utils/canvas_wrapper_test.mocks.dart b/test/utils/canvas_wrapper_test.mocks.dart index cccfd2559..48153adb5 100644 --- a/test/utils/canvas_wrapper_test.mocks.dart +++ b/test/utils/canvas_wrapper_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/utils/canvas_wrapper_test.dart. // Do not manually edit this file. @@ -96,6 +96,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void saveLayer( _i2.Rect? bounds, @@ -111,6 +112,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restore() => super.noSuchMethod( Invocation.method( @@ -119,6 +121,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void restoreToCount(int? count) => super.noSuchMethod( Invocation.method( @@ -127,6 +130,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override int getSaveCount() => (super.noSuchMethod( Invocation.method( @@ -135,6 +139,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: 0, ) as int); + @override void translate( double? dx, @@ -150,6 +155,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void scale( double? sx, [ @@ -165,6 +171,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void rotate(double? radians) => super.noSuchMethod( Invocation.method( @@ -173,6 +180,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void skew( double? sx, @@ -188,6 +196,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void transform(_i4.Float64List? matrix4) => super.noSuchMethod( Invocation.method( @@ -196,6 +205,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i4.Float64List getTransform() => (super.noSuchMethod( Invocation.method( @@ -204,6 +214,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValue: _i4.Float64List(0), ) as _i4.Float64List); + @override void clipRect( _i2.Rect? rect, { @@ -221,6 +232,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipRRect( _i2.RRect? rrect, { @@ -234,6 +246,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void clipPath( _i2.Path? path, { @@ -247,6 +260,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override _i2.Rect getLocalClipBounds() => (super.noSuchMethod( Invocation.method( @@ -261,6 +275,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override _i2.Rect getDestinationClipBounds() => (super.noSuchMethod( Invocation.method( @@ -275,6 +290,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), ), ) as _i2.Rect); + @override void drawColor( _i2.Color? color, @@ -290,6 +306,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawLine( _i2.Offset? p1, @@ -307,6 +324,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPaint(_i2.Paint? paint) => super.noSuchMethod( Invocation.method( @@ -315,6 +333,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRect( _i2.Rect? rect, @@ -330,6 +349,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRRect( _i2.RRect? rrect, @@ -345,6 +365,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawDRRect( _i2.RRect? outer, @@ -362,6 +383,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawOval( _i2.Rect? rect, @@ -377,6 +399,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawCircle( _i2.Offset? c, @@ -394,6 +417,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawArc( _i2.Rect? rect, @@ -415,6 +439,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPath( _i2.Path? path, @@ -430,6 +455,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImage( _i2.Image? image, @@ -447,6 +473,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageRect( _i2.Image? image, @@ -466,6 +493,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawImageNine( _i2.Image? image, @@ -485,6 +513,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPicture(_i2.Picture? picture) => super.noSuchMethod( Invocation.method( @@ -493,6 +522,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawParagraph( _i2.Paragraph? paragraph, @@ -508,6 +538,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawPoints( _i2.PointMode? pointMode, @@ -525,6 +556,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawPoints( _i2.PointMode? pointMode, @@ -542,6 +574,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawVertices( _i2.Vertices? vertices, @@ -559,6 +592,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawAtlas( _i2.Image? atlas, @@ -584,6 +618,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawRawAtlas( _i2.Image? atlas, @@ -609,6 +644,7 @@ class MockCanvas extends _i1.Mock implements _i2.Canvas { ), returnValueForMissingStub: null, ); + @override void drawShadow( _i2.Path? path, @@ -643,6 +679,7 @@ class MockFlDotPainter extends _i1.Mock implements _i5.FlDotPainter { Invocation.getter(#props), returnValue: [], ) as List); + @override void draw( _i2.Canvas? canvas, @@ -660,6 +697,7 @@ class MockFlDotPainter extends _i1.Mock implements _i5.FlDotPainter { ), returnValueForMissingStub: null, ); + @override _i2.Size getSize(_i5.FlSpot? spot) => (super.noSuchMethod( Invocation.method( @@ -692,6 +730,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), returnValue: 0.0, ) as double); + @override double degrees(double? radians) => (super.noSuchMethod( Invocation.method( @@ -700,6 +739,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Size getDefaultSize(_i2.Size? screenSize) => (super.noSuchMethod( Invocation.method( @@ -714,6 +754,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), ), ) as _i2.Size); + @override double translateRotatedPosition( double? size, @@ -729,6 +770,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Offset calculateRotationOffset( _i2.Size? size, @@ -753,6 +795,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), ), ) as _i2.Offset); + @override _i3.BorderRadius? normalizeBorderRadius( _i3.BorderRadius? borderRadius, @@ -765,6 +808,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { width, ], )) as _i3.BorderRadius?); + @override _i3.BorderSide normalizeBorderSide( _i3.BorderSide? borderSide, @@ -789,6 +833,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), ), ) as _i3.BorderSide); + @override double getEfficientInterval( double? axisViewSize, @@ -806,6 +851,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), returnValue: 0.0, ) as double); + @override double roundInterval(double? input) => (super.noSuchMethod( Invocation.method( @@ -814,14 +860,34 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), returnValue: 0.0, ) as double); + @override - String formatNumber(double? number) => (super.noSuchMethod( + int getFractionDigits(double? value) => (super.noSuchMethod( + Invocation.method( + #getFractionDigits, + [value], + ), + returnValue: 0, + ) as int); + + @override + String formatNumber( + double? axisMin, + double? axisMax, + double? axisValue, + ) => + (super.noSuchMethod( Invocation.method( #formatNumber, - [number], + [ + axisMin, + axisMax, + axisValue, + ], ), returnValue: '', ) as String); + @override _i3.TextStyle getThemeAwareTextStyle( _i3.BuildContext? context, @@ -846,6 +912,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), ), ) as _i3.TextStyle); + @override double getBestInitialIntervalValue( double? min, @@ -865,6 +932,7 @@ class MockUtils extends _i1.Mock implements _i6.Utils { ), returnValue: 0.0, ) as double); + @override double convertRadiusToSigma(double? radius) => (super.noSuchMethod( Invocation.method( diff --git a/test/utils/utils_test.dart b/test/utils/utils_test.dart index d06d7559d..85d9e750c 100644 --- a/test/utils/utils_test.dart +++ b/test/utils/utils_test.dart @@ -220,34 +220,53 @@ void main() { expect(Utils().getEfficientInterval(10, 0), 1); }); + test('test getFractionDigits', () { + expect(Utils().getFractionDigits(1), 1); + expect(Utils().getFractionDigits(343), 1); + expect(Utils().getFractionDigits(22), 1); + expect(Utils().getFractionDigits(444444), 1); + expect(Utils().getFractionDigits(0.9), 2); + expect(Utils().getFractionDigits(0.1), 2); + expect(Utils().getFractionDigits(0.01), 3); + expect(Utils().getFractionDigits(0.001), 4); + expect(Utils().getFractionDigits(0.009), 4); + expect(Utils().getFractionDigits(0.008), 4); + expect(Utils().getFractionDigits(0.0001), 5); + expect(Utils().getFractionDigits(0.0009), 5); + expect(Utils().getFractionDigits(0.00001), 6); + expect(Utils().getFractionDigits(0.000001), 7); + expect(Utils().getFractionDigits(0.0000001), 8); + expect(Utils().getFractionDigits(0.00000001), 9); + }); + test('test formatNumber', () { - expect(Utils().formatNumber(0), '0'); - expect(Utils().formatNumber(-0), '0'); - expect(Utils().formatNumber(-0.01), '0'); - expect(Utils().formatNumber(0.01), '0'); - expect(Utils().formatNumber(-0.1), '-0.1'); - expect(Utils().formatNumber(423), '423'); - expect(Utils().formatNumber(-423), '-423'); - expect(Utils().formatNumber(1000), '1K'); - expect(Utils().formatNumber(1234), '1.2K'); - expect(Utils().formatNumber(10000), '10K'); - expect(Utils().formatNumber(41234), '41.2K'); - expect(Utils().formatNumber(82349), '82.3K'); - expect(Utils().formatNumber(82350), '82.3K'); - expect(Utils().formatNumber(82351), '82.4K'); - expect(Utils().formatNumber(-82351), '-82.4K'); - expect(Utils().formatNumber(100000), '100K'); - expect(Utils().formatNumber(101000), '101K'); - expect(Utils().formatNumber(2345123), '2.3M'); - expect(Utils().formatNumber(2352123), '2.4M'); - expect(Utils().formatNumber(-2352123), '-2.4M'); - expect(Utils().formatNumber(521000000), '521M'); - expect(Utils().formatNumber(4324512345), '4.3B'); - expect(Utils().formatNumber(4000000000), '4B'); - expect(Utils().formatNumber(-4000000000), '-4B'); - expect(Utils().formatNumber(823147521343), '823.1B'); - expect(Utils().formatNumber(8231475213435), '8231.5B'); - expect(Utils().formatNumber(-8231475213435), '-8231.5B'); + expect(Utils().formatNumber(0, 10, 0), '0'); + expect(Utils().formatNumber(0, 10, -0), '0'); + expect(Utils().formatNumber(0, 10, -0.01), '0'); + expect(Utils().formatNumber(0, 10, 0.01), '0'); + expect(Utils().formatNumber(0, 10, -0.1), '-0.1'); + expect(Utils().formatNumber(0, 10, 423), '423'); + expect(Utils().formatNumber(0, 10, -423), '-423'); + expect(Utils().formatNumber(0, 10, 1000), '1K'); + expect(Utils().formatNumber(0, 10, 1234), '1.2K'); + expect(Utils().formatNumber(0, 10, 10000), '10K'); + expect(Utils().formatNumber(0, 10, 41234), '41.2K'); + expect(Utils().formatNumber(0, 10, 82349), '82.3K'); + expect(Utils().formatNumber(0, 10, 82350), '82.3K'); + expect(Utils().formatNumber(0, 10, 82351), '82.4K'); + expect(Utils().formatNumber(0, 10, -82351), '-82.4K'); + expect(Utils().formatNumber(0, 10, 100000), '100K'); + expect(Utils().formatNumber(0, 10, 101000), '101K'); + expect(Utils().formatNumber(0, 10, 2345123), '2.3M'); + expect(Utils().formatNumber(0, 10, 2352123), '2.4M'); + expect(Utils().formatNumber(0, 10, -2352123), '-2.4M'); + expect(Utils().formatNumber(0, 10, 521000000), '521M'); + expect(Utils().formatNumber(0, 10, 4324512345), '4.3B'); + expect(Utils().formatNumber(0, 10, 4000000000), '4B'); + expect(Utils().formatNumber(0, 10, -4000000000), '-4B'); + expect(Utils().formatNumber(0, 10, 823147521343), '823.1B'); + expect(Utils().formatNumber(0, 10, 8231475213435), '8231.5B'); + expect(Utils().formatNumber(0, 10, -8231475213435), '-8231.5B'); }); group('test getThemeAwareTextStyle', () { diff --git a/test/utils/utils_test.mocks.dart b/test/utils/utils_test.mocks.dart index fe4c97927..952e998a8 100644 --- a/test/utils/utils_test.mocks.dart +++ b/test/utils/utils_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.2 from annotations // in fl_chart/test/utils/utils_test.dart. // Do not manually edit this file. @@ -132,6 +132,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), returnValue: 0.0, ) as double); + @override double degrees(double? radians) => (super.noSuchMethod( Invocation.method( @@ -140,6 +141,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Size getDefaultSize(_i2.Size? screenSize) => (super.noSuchMethod( Invocation.method( @@ -154,6 +156,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), ), ) as _i2.Size); + @override double translateRotatedPosition( double? size, @@ -169,6 +172,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), returnValue: 0.0, ) as double); + @override _i2.Offset calculateRotationOffset( _i2.Size? size, @@ -193,6 +197,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), ), ) as _i2.Offset); + @override _i3.BorderRadius? normalizeBorderRadius( _i3.BorderRadius? borderRadius, @@ -205,6 +210,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { width, ], )) as _i3.BorderRadius?); + @override _i3.BorderSide normalizeBorderSide( _i3.BorderSide? borderSide, @@ -229,6 +235,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), ), ) as _i3.BorderSide); + @override double getEfficientInterval( double? axisViewSize, @@ -246,6 +253,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), returnValue: 0.0, ) as double); + @override double roundInterval(double? input) => (super.noSuchMethod( Invocation.method( @@ -254,14 +262,34 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), returnValue: 0.0, ) as double); + @override - String formatNumber(double? number) => (super.noSuchMethod( + int getFractionDigits(double? value) => (super.noSuchMethod( + Invocation.method( + #getFractionDigits, + [value], + ), + returnValue: 0, + ) as int); + + @override + String formatNumber( + double? axisMin, + double? axisMax, + double? axisValue, + ) => + (super.noSuchMethod( Invocation.method( #formatNumber, - [number], + [ + axisMin, + axisMax, + axisValue, + ], ), returnValue: '', ) as String); + @override _i3.TextStyle getThemeAwareTextStyle( _i3.BuildContext? context, @@ -286,6 +314,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), ), ) as _i3.TextStyle); + @override double getBestInitialIntervalValue( double? min, @@ -305,6 +334,7 @@ class MockUtils extends _i1.Mock implements _i5.Utils { ), returnValue: 0.0, ) as double); + @override double convertRadiusToSigma(double? radius) => (super.noSuchMethod( Invocation.method( @@ -331,16 +361,19 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { Invocation.getter(#widget), ), ) as _i3.Widget); + @override bool get mounted => (super.noSuchMethod( Invocation.getter(#mounted), returnValue: false, ) as bool); + @override bool get debugDoingBuild => (super.noSuchMethod( Invocation.getter(#debugDoingBuild), returnValue: false, ) as bool); + @override _i3.InheritedWidget dependOnInheritedElement( _i3.InheritedElement? ancestor, { @@ -361,6 +394,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.InheritedWidget); + @override void visitAncestorElements(_i3.ConditionalElementVisitor? visitor) => super.noSuchMethod( @@ -370,6 +404,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void visitChildElements(_i3.ElementVisitor? visitor) => super.noSuchMethod( Invocation.method( @@ -378,6 +413,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override void dispatchNotification(_i3.Notification? notification) => super.noSuchMethod( @@ -387,6 +423,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValueForMissingStub: null, ); + @override _i3.DiagnosticsNode describeElement( String? name, { @@ -407,6 +444,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override _i3.DiagnosticsNode describeWidget( String? name, { @@ -427,6 +465,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), ), ) as _i3.DiagnosticsNode); + @override List<_i3.DiagnosticsNode> describeMissingAncestor( {required Type? expectedAncestorType}) => @@ -438,6 +477,7 @@ class MockBuildContext extends _i1.Mock implements _i3.BuildContext { ), returnValue: <_i3.DiagnosticsNode>[], ) as List<_i3.DiagnosticsNode>); + @override _i3.DiagnosticsNode describeOwnershipChain(String? name) => (super.noSuchMethod( From 8dbbb961bdc68b216e4069ed88d8f3822c1775aa Mon Sep 17 00:00:00 2001 From: imaNNeoFighT Date: Sat, 7 Oct 2023 03:16:23 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99114db56..c302bfd86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * **BUGFIX** (by @Anas35) Fix Tooltip not displaying when value from BackgroundBarChartRodData is less than zero. #1345. * **BUGFIX** (by @imaNNeo) Fix Negative BarChartRodStackItem are not drawn correctly bug, #1347 * **BUGFIX** (by @imaNNeo) Fix bar_chart_helper minY calculation bug, #1388 +* **IMPROVEMENT** (by @imaNNeo) Consider fraction digits when formatting chart side titles, #1267 ## 0.63.0 * **BUGFIX** (by @imaNNeo) Fix PieChart crash on web-renderer html by ignoring `sectionsSpace` when `Path.combine()` does not work (it's flutter engine [issue](https://github.com/flutter/flutter/issues/44572)), #955