alibaba / fish-redux

An assembled flutter application framework.
https://github.com/alibaba/fish-redux
Apache License 2.0
7.33k stars 843 forks source link

ItemBean's clone method not work #493

Closed voiddog closed 5 years ago

voiddog commented 5 years ago

Describe the bug Current ItemBean is

class ItemBean {
  final String type;
  final Object data;

  const ItemBean(this.type, this.data);

  ItemBean clone({String type, Object data}) => ItemBean(type, data);
}

I think the correct code is below:

class ItemBean {
  final String type;
  final Object data;

  const ItemBean(this.type, this.data);

  ItemBean clone({String type, Object data}) 
    => ItemBean(type ?? this.type, data ?? this.data);
}
zjuwjf commented 5 years ago

感谢反馈, 已发布0.2.8