Skip to content

Commit

Permalink
Complete Redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisderock committed Jul 7, 2020
1 parent 4cf8bc0 commit 1b7cce7
Show file tree
Hide file tree
Showing 55 changed files with 814 additions and 462 deletions.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
shrinkResources false
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.ebmradio.ebmradioplayer">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
Expand Down Expand Up @@ -45,5 +47,15 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<service android:name="com.ryanheise.audioservice.AudioService">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService"/>
</intent-filter>
</service>
<receiver android:name="com.ryanheise.audioservice.MediaButtonReceiver">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON"/>
</intent-filter>
</receiver>
</application>
</manifest>
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.
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.
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
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"
1 change: 1 addition & 0 deletions ios/Flutter/Release.xcconfig
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"
1 change: 1 addition & 0 deletions lib/generated/intl/messages_de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class MessageLookup extends MessageLookupByLibrary {
"ourWebsite" : MessageLookupByLibrary.simpleMessage("Mehr auf unserer Website"),
"send" : MessageLookupByLibrary.simpleMessage("Senden"),
"songName" : MessageLookupByLibrary.simpleMessage("Dein Wunschsong:"),
"wishError" : MessageLookupByLibrary.simpleMessage("Fehler beim Verschicken"),
"wishSent" : MessageLookupByLibrary.simpleMessage("Wunsch verschickt"),
"yourName" : MessageLookupByLibrary.simpleMessage("Dein Name:")
};
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class MessageLookup extends MessageLookupByLibrary {
"ourWebsite" : MessageLookupByLibrary.simpleMessage("Visit our Website"),
"send" : MessageLookupByLibrary.simpleMessage("Send"),
"songName" : MessageLookupByLibrary.simpleMessage("Songname:"),
"wishError" : MessageLookupByLibrary.simpleMessage("Error on sending"),
"wishSent" : MessageLookupByLibrary.simpleMessage("Wish sent"),
"yourName" : MessageLookupByLibrary.simpleMessage("Your name:")
};
Expand Down
1 change: 1 addition & 0 deletions lib/generated/intl/messages_fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class MessageLookup extends MessageLookupByLibrary {
"ourWebsite" : MessageLookupByLibrary.simpleMessage("visitez notre site Internet"),
"send" : MessageLookupByLibrary.simpleMessage("Envoyer"),
"songName" : MessageLookupByLibrary.simpleMessage("titre de la chanson:"),
"wishError" : MessageLookupByLibrary.simpleMessage("erreur d\'envoi"),
"wishSent" : MessageLookupByLibrary.simpleMessage("souhait envoyé"),
"yourName" : MessageLookupByLibrary.simpleMessage("Votre nom:")
};
Expand Down
10 changes: 10 additions & 0 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions lib/gui/ebm_news.dart
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);
},
)
]
)
);
}
}
Loading

0 comments on commit 1b7cce7

Please sign in to comment.