-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4cf8bc0
commit 1b7cce7
Showing
55 changed files
with
814 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+516 Bytes
android/app/src/main/res/drawable-xhdpi/ic_action_skip_previous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+808 Bytes
android/app/src/main/res/drawable-xxhdpi/ic_action_skip_previous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1012 Bytes
android/app/src/main/res/drawable-xxxhdpi/ic_action_play_arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Binary file added
BIN
+1.13 KB
android/app/src/main/res/drawable-xxxhdpi/ic_action_skip_previous.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import 'package:basic_utils/basic_utils.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:ebmradioplayer/generated/l10n.dart'; | ||
import 'package:url_launcher/url_launcher.dart'; | ||
import 'dart:async'; | ||
|
||
import 'package:webfeed/webfeed.dart'; | ||
|
||
class EbmNews extends StatefulWidget { | ||
EbmNews({ | ||
this.webUrl, | ||
this.newsFeed | ||
}); | ||
_EbmNews createState() => _EbmNews(); | ||
final List<String> _newsItems = List<String>(); | ||
final String webUrl; | ||
final String newsFeed; | ||
} | ||
|
||
class _EbmNews extends State<EbmNews>{ | ||
void initState(){ | ||
super.initState(); | ||
_feed(); | ||
Timer.periodic(Duration(hours: 1),(timer){ | ||
_feed(); | ||
}); | ||
} | ||
_feed() async { | ||
var feed = await HttpUtils.getForString(widget.newsFeed); | ||
var rss = RssFeed.parse(feed); | ||
setState(() { | ||
int i = 0; | ||
widget._newsItems.clear(); | ||
rss.items.forEach((element) { | ||
if(i++ < 11) { | ||
print(element.title); | ||
widget._newsItems.add(element.title); | ||
} | ||
}); | ||
}); | ||
} | ||
_visitWeb(String url) async { | ||
if(await canLaunch(url)){ | ||
await launch(url); | ||
} | ||
} | ||
Widget build(BuildContext context){ | ||
return Container( | ||
height: 280, | ||
child: Column( | ||
children: [ | ||
Text("News"), | ||
ListView.builder( | ||
shrinkWrap: true, | ||
itemCount: widget._newsItems.length, | ||
itemBuilder: (BuildContext ctxt, int index){ | ||
return new Text( | ||
widget._newsItems[index], | ||
textAlign: TextAlign.center, | ||
); | ||
} | ||
), | ||
RaisedButton( | ||
child: Text(S.current.ourWebsite), | ||
onPressed: (){ | ||
_visitWeb(widget.webUrl); | ||
}, | ||
) | ||
] | ||
) | ||
); | ||
} | ||
} |
Oops, something went wrong.