stock_sentiment 0.0.5 copy "stock_sentiment: ^0.0.5" to clipboard
stock_sentiment: ^0.0.5 copied to clipboard

A package to get stock sentiment from headlines. Given a String of tickers seperated by space, it will give you all the sentiment.

example/main.dart

// @dart=2.9
/// import the stock sentiment package
import 'package:stock_sentiment/stock_sentiment.dart';

/// main() example
void main() {
  var sentiment = StockSentiment("GOOG ?jO+");

  /// get headlines for 8 days
  try {
    sentiment.getHeadlines(8).then((value) {
      print(value);

      /// get the sentiment for each day
      var stuff = sentiment.getDailySentiment(value);
      print(stuff);

      /// get a single headline sentiment
      var single = sentiment.getSingleSentiment(value["GOOG"][0].text);

      print(single);

      /// this will be null
      print(value["?jO+"]);
    });
  } catch (e) {
    print(e);
  }
}
0
likes
80
pub points
0%
popularity

Publisher

verified publishercopypasteearth.com

A package to get stock sentiment from headlines. Given a String of tickers seperated by space, it will give you all the sentiment.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, html, http, intl, sentiment_dart

More

Packages that depend on stock_sentiment