Sentence constructor

Sentence({
  1. TextSpan? text,
  2. Sentiment? sentiment,
})

Implementation

factory Sentence({
  TextSpan? text,
  Sentiment? sentiment,
}) {
  final _result = create();
  if (text != null) {
    _result.text = text;
  }
  if (sentiment != null) {
    _result.sentiment = sentiment;
  }
  return _result;
}