Skip to content

Commit 9a06043

Browse files
update doc
1 parent 219eed2 commit 9a06043

20 files changed

+74
-101
lines changed

lib/src/chart.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import 'package:flutter/material.dart';
1010
class Chart extends StatefulWidget {
1111
/// The duration animation of charts.
1212
///
13-
/// Default to Duration(
14-
/// milliseconds: 300,
15-
/// )
13+
/// Default to Duration(milliseconds: 300)
1614
final Duration duration;
1715

1816
/// The layers of charts.
@@ -103,8 +101,7 @@ class _ChartState extends State<Chart> with TickerProviderStateMixin {
103101
controller: _controller,
104102
layers: widget.layers,
105103
oldLayers: oldLayers,
106-
onUpdateTouchableShapes: (shapes) =>
107-
_touchableShapes = shapes,
104+
onUpdateTouchableShapes: (shapes) => _touchableShapes = shapes,
108105
padding: widget.padding,
109106
touchedData: _touchedData,
110107
),

lib/src/models/animation/chart_animation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ part 'chart_position_animation.dart';
66
part 'chart_size_animation.dart';
77
part 'chart_text_style_animation.dart';
88

9-
/// Base class for animation that allows animation values.
9+
/// Abstract class for animation.
1010
abstract class ChartAnimation {
1111
void dispose();
1212
}

lib/src/models/animation/chart_color_animation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ class ChartColorAnimation implements ChartAnimation {
77

88
ChartColorAnimation();
99

10-
/// Current color value in while animation.
10+
/// Current value during the animation.
1111
///
1212
/// Default to Colors.transparent
1313
Color get current => _lastColor = _animation?.value ?? Colors.transparent;
1414

15-
/// Last color value on finish/stop animation.
15+
/// Last value on finish/stop animation.
1616
///
1717
/// Default to Colors.transparent
1818
Color get last => _lastColor;

lib/src/models/animation/chart_double_animation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class ChartDoubleAnimation implements ChartAnimation {
77

88
ChartDoubleAnimation();
99

10-
/// Current double value in while animation.
10+
/// Current value during the animation.
1111
///
1212
/// Default to 0.0
1313
double get current => _lastValue = _animation?.value ?? 0.0;

lib/src/models/animation/chart_position_animation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ class ChartPositionAnimation implements ChartAnimation {
77

88
ChartPositionAnimation();
99

10-
/// Current Offset value in while animation.
10+
/// Current value during the animation.
1111
///
1212
/// Default to Offset.zero
1313
Offset get current => _lastPosition = _animation?.value ?? Offset.zero;
1414

15-
/// Last Offset value on finish/stop animation.
15+
/// Last value on finish/stop animation.
1616
///
1717
/// Default to Offset.zero
1818
Offset get last => _lastPosition;

lib/src/models/animation/chart_size_animation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ class ChartSizeAnimation implements ChartAnimation {
77

88
ChartSizeAnimation();
99

10-
/// Current Size value in while animation.
10+
/// Current value during the animation.
1111
///
1212
/// Default to Size.zero
1313
Size get current => _lastSize = _animation?.value ?? Size.zero;
1414

15-
/// Last Size value on finish/stop animation.
15+
/// Last value on finish/stop animation.
1616
///
1717
/// Default to Size.zero
1818
Size get last => _lastSize;

lib/src/models/animation/chart_text_style_animation.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,17 @@ class ChartTextStyleAnimation implements ChartAnimation {
99

1010
ChartTextStyleAnimation();
1111

12-
/// Current TextStyle value in while animation.
12+
/// Current value during the animation.
1313
///
14-
/// Default to TextStyle(
15-
/// color: Colors.transparent,
16-
/// )
14+
/// Default to TextStyle(color: Colors.transparent)
1715
TextStyle get current => _lastTextStyle = _animation?.value ??
1816
const TextStyle(
1917
color: Colors.transparent,
2018
);
2119

22-
/// Last TextStyle value on finish/stop animation.
20+
/// Last value on finish/stop animation.
2321
///
24-
/// Default to TextStyle(
25-
/// color: Colors.transparent,
26-
/// )
22+
/// Default to TextStyle(color: Colors.transparent)
2723
TextStyle get last => _lastTextStyle;
2824

2925
/// Dispose animation.

lib/src/models/axis/data/chart_axis_data_item.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ class ChartAxisDataItem {
1717
}) : _pos = ChartPositionAnimation(),
1818
_textStyle = ChartTextStyleAnimation();
1919

20-
/// Current position in while animation.
20+
/// Current position during the animation.
2121
///
2222
/// Default to Offset.zero
2323
Offset get currentPos => _pos.current;
2424

25-
/// Current TextStyle in while animation.
25+
/// Current TextStyle during the animation.
2626
///
27-
/// Default to TextStyle(
28-
/// color: Colors.transparent,
29-
/// )
27+
/// Default to TextStyle(color: Colors.transparent)
3028
TextStyle get currentTextStyle => _textStyle.current;
3129

3230
/// Last position on finish/stop animation.
@@ -36,9 +34,7 @@ class ChartAxisDataItem {
3634

3735
/// Last TextStyle on finish/stop animation.
3836
///
39-
/// Default to TextStyle(
40-
/// color: Colors.transparent,
41-
/// )
37+
/// Default to TextStyle(color: Colors.transparent)
4238
TextStyle get lastTextStyle => _textStyle.last;
4339

4440
/// Dispose all animations.

lib/src/models/bar/chart_bar_data_item.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@ class ChartBarDataItem extends ChartDataItem {
2121
}) : _touch = _ChartBarDataItemTouch(),
2222
_value = _ChartBarDataItemValue();
2323

24-
/// Current touch area position in while animation.
24+
/// Current touch area position during the animation.
2525
///
2626
/// Default to Offset.zero
2727
Offset get currentTouchPos => _touch.currentPos;
2828

29-
/// Current touch area size in while animation.
29+
/// Current touch area size during the animation.
3030
///
3131
/// Default to Size.zero
3232
Size get currentTouchSize => _touch.currentSize;
3333

34-
/// Current color in while animation.
34+
/// Current color during the animation.
3535
///
3636
/// Default to Colors.transparent
3737
Color get currentValueColor => _value.currentColor;
3838

39-
/// Current position in while animation.
39+
/// Current position during the animation.
4040
///
4141
/// Default to Offset.zero
4242
Offset get currentValuePos => _value.currentPos;
4343

44-
/// Current size in while animation.
44+
/// Current size during the animation.
4545
///
4646
/// Default to Size.zero
4747
Size get currentValueSize => _value.currentSize;
@@ -129,12 +129,12 @@ class _ChartBarDataItemTouch {
129129
: _pos = ChartPositionAnimation(),
130130
_size = ChartSizeAnimation();
131131

132-
/// Current position in while animation.
132+
/// Current position during the animation.
133133
///
134134
/// Default to Offset.zero
135135
Offset get currentPos => _pos.current;
136136

137-
/// Current size in while animation.
137+
/// Current size during the animation.
138138
///
139139
/// Default to Size.zero
140140
Size get currentSize => _size.current;
@@ -191,17 +191,17 @@ class _ChartBarDataItemValue {
191191
_pos = ChartPositionAnimation(),
192192
_size = ChartSizeAnimation();
193193

194-
/// Current color in while animation.
194+
/// Current color during the animation.
195195
///
196196
/// Default to Colors.transparent
197197
Color get currentColor => _color.current;
198198

199-
/// Current position in while animation.
199+
/// Current position during the animation.
200200
///
201201
/// Default to Offset.zero
202202
Offset get currentPos => _pos.current;
203203

204-
/// Current size in while animation.
204+
/// Current size during the animation.
205205
///
206206
/// Default to Size.zero
207207
Size get currentSize => _size.current;

lib/src/models/candle/chart_candle_data_item_value.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ class ChartCandleDataItemValue {
1919
_pos = ChartPositionAnimation(),
2020
_size = ChartSizeAnimation();
2121

22-
/// Current color in while animation.
22+
/// Current color during the animation.
2323
///
2424
/// Default to Colors.transparent
2525
Color get currentColor => _color.current;
2626

27-
/// Current position in while animation.
27+
/// Current position during the animation.
2828
///
2929
/// Default to Offset.zero
3030
Offset get currentPos => _pos.current;
3131

32-
/// Current size in while animation.
32+
/// Current size during the animation.
3333
///
3434
/// Default to Size.zero
3535
Size get currentSize => _size.current;

0 commit comments

Comments
 (0)