Flutter feed generator - Generate some awesome feeds widgets using Flutter
This repo includes a repo app, if you download it and launch main.dart you will run a "Demo App" with all the feeds examples in the drawer
/!\ Some Feeds require some configuration before you can run them for example the Twitter Feed require a config.yaml file (See below section)
A feed to get user timeline given by its credentials
Use the available constructor to inject credentials from a config.yaml file following this pattern
twitterFeed:
consumerKey: foo
consumerSecret: bar
accessToken: peanuts
accessTokenSecret: spaghetti
And instanciate your twitter feed widget
TwitterFeedWidget()
By default, the query value is statuses/user_timeline.json,
this will display your timeline (if you use your own credentials) !
So basically, the timeline of the account to which the credentials belong.
If you want, you can override this default value and display, let's say another user feed : for example Chuck Norris. To do this, simply add the named parameter like this
TwitterFeedWidget(
query: "statuses/user_timeline.json?screen_name=chucknorris"
),
Be carefoul though, some basic credentials might not be enough to display everything.
Twitter Feed - Overview
A generic feed you can customize with your own collector and renderer. With this one, you can focus on collecting and displaying your data.
To use the generic feed, you have to implement your data collector and your renderer.
The collector must extends the Abstract class AbstractCollector. The
gather() method will be used to collect the data.
The renderer must extends the Abstract class AbstractRenderer. The
render() method will be used to generate the feed widget.
If you want an example, have a look at the ExampleCollector and ExampleRenderer
in the abstract_collector and abstract_renderer files.
Once all your collector and renderer are done, just call the GenericFeed with
GenericFeed(MyCollector(), MyRenderer())
- More feeds : Medium, Github ?
- Package and publish it to allow simple integration
Alexi Coard (alexicoard[at]gmail.com)
Feel free to contribute if you want to add more feeds, improve code or fix bugs !
