The Webfeed Flutter package for Appeto SDK.
No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- import 'dart:async';
-
- import 'package:http/http.dart' as http;
- import 'package:webfeed/domain/rss_feed.dart';
-
- class WebFeedClient {
- http.Client client;
-
- WebFeedClient(http.Client httpClient) {
- client = httpClient;
- }
-
- Future<RssFeed> fetch(String url) {
- return client.get(url).then((response) {
- print("Response Status Code: ${response.statusCode}");
- print("Response Body: ${response.body}");
- return response.body;
- }).then((bodyString) {
- var channel = new RssFeed.parse(bodyString);
- return channel;
- });
- }
- }
|