Skip to content

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

Description

@Arfaz123

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']),
);

}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions