Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ramin/fix_worm_chart #284

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,11 @@ class MACDIndicatorItemState extends IndicatorItemState<MACDIndicatorConfig> {

// TODO(Ramin): Add generic type to avoid casting.
int get _currentSlowMAPeriod =>
_slowMAPeriod ??
(widget.config as MACDIndicatorConfig).slowMAPeriod;
_slowMAPeriod ?? (widget.config as MACDIndicatorConfig).slowMAPeriod;

int get _currentFastMAPeriod =>
_fastMAPeriod ??
(widget.config as MACDIndicatorConfig).fastMAPeriod;
_fastMAPeriod ?? (widget.config as MACDIndicatorConfig).fastMAPeriod;

int get _currentSignalPeriod =>
_signalPeriod ??
(widget.config as MACDIndicatorConfig).signalPeriod;
_signalPeriod ?? (widget.config as MACDIndicatorConfig).signalPeriod;
}
2 changes: 1 addition & 1 deletion lib/src/add_ons/indicators_ui/roc/roc_indicator_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ROCIndicatorItem extends IndicatorItem {
required UpdateIndicator updateIndicator,
required VoidCallback deleteIndicator,
Key? key,
ROCIndicatorConfig config=const ROCIndicatorConfig(),
ROCIndicatorConfig config = const ROCIndicatorConfig(),
}) : super(
key: key,
title: 'ROC',
Expand Down
28 changes: 14 additions & 14 deletions lib/src/add_ons/indicators_ui/widgets/field_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ class FieldWidget extends StatelessWidget {

@override
Widget build(BuildContext context) => Row(
children: <Widget>[
Text(label, style: const TextStyle(fontSize: 10)),
const SizedBox(width: 4),
SizedBox(
width: 20,
child: TextFormField(
style: const TextStyle(fontSize: 10),
initialValue: initialValue,
keyboardType: TextInputType.number,
onChanged: onValueChanged,
),
),
],
);
children: <Widget>[
Text(label, style: const TextStyle(fontSize: 10)),
const SizedBox(width: 4),
SizedBox(
width: 20,
child: TextFormField(
style: const TextStyle(fontSize: 10),
initialValue: initialValue,
keyboardType: TextInputType.number,
onChanged: onValueChanged,
),
),
],
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class AlligatorOptions extends IndicatorOptions {
this.jawPeriod = 13,
this.teethPeriod = 8,
this.lipsPeriod = 5,
this.showLines=true,
this.showFractal=false,
this.showLines = true,
this.showFractal = false,
}) : super();

/// Smoothing period for jaw series
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ class MAEnvOptions extends MAOptions {
final ShiftType shiftType;

@override
List<Object> get props => super.props..add(shift)..add(shiftType);
List<Object> get props => super.props
..add(shift)
..add(shiftType);
}
2 changes: 1 addition & 1 deletion lib/src/deriv_chart/chart/worm_chart/worm_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class _WormChartState extends State<WormChart>
_rightIndexAnimationController = AnimationController.unbounded(
vsync: this,
duration: widget.updateAnimationDuration,
value: 1,
value: widget.ticks.length.toDouble() + 1,
);
}

Expand Down
3 changes: 1 addition & 2 deletions lib/src/theme/chart_default_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ abstract class ChartDefaultTheme implements ChartTheme {
);

@override
EntrySpotStyle get entrySpotStyle =>
const EntrySpotStyle();
EntrySpotStyle get entrySpotStyle => const EntrySpotStyle();

@override
HorizontalBarrierStyle get horizontalBarrierStyle => HorizontalBarrierStyle(
Expand Down
1 change: 1 addition & 0 deletions test/benchmark/benchmark.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@