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

error in return statements ----> Candle() #1

Open
Arfaz123 opened this issue Apr 13, 2022 · 0 comments
Open

error in return statements ----> Candle() #1

Arfaz123 opened this issue Apr 13, 2022 · 0 comments

Comments

@Arfaz123
Copy link

Arfaz123 commented Apr 13, 2022

class Candle {
final bool complete;
final int value;
final String time;
final CandleItem candleItem;

Candle({required this.complete, required this.value, required this.time, required this.candleItem});

factory Candle.fromJson(dynamic json) {
if (json == null) {
return Candle();
}

return Candle(
  complete: json['complete'],
  value: json['value'],
  time: json['time'],
  candleItem: CandleItem.fromJson(json['ask']),
);

}
}

@Arfaz123 Arfaz123 changed the title error in all return statements error in return statements ----> Candle() Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant