getSingleSentiment method Null safety

Map<String, dynamic> getSingleSentiment(
  1. String text
)

getSingleSentiment takes a String of text to have sentiment analysis ran on returns score and other mapped data about the sentiment

Implementation

Map<String, dynamic> getSingleSentiment(String text) {
  final sentiment = Sentiment();
  var result = sentiment.analysis(text);
  return result;
}