Skip to content

Commit

Permalink
New Version
Browse files Browse the repository at this point in the history
  • Loading branch information
RazorMeister committed Oct 24, 2019
1 parent 067ffc6 commit b1676d2
Show file tree
Hide file tree
Showing 18 changed files with 197 additions and 139 deletions.
243 changes: 121 additions & 122 deletions .idea/workspace.xml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions Changelog.txt
@@ -0,0 +1,11 @@
Version 1.0.4
1. Możliwość odświeżenia listy piosenek aktywna dopiero po jej pobraniu.
2. Akordy występujące bezpośrednio przy nawiasie można transponować.
3. Podczas wyszukiwania dodano informacje o braku znalezionych piosenek.
4. Dodanie przycisku info na stronie głównej, który pokazuje liczbę piosenek w bazie.

Version: 1.0.3
1. Dodanie ostatnich piosenek,
2. Dodanie menu bocznego,
3. Więcej ustawień,
4. Dodanie systemu playlist.
Binary file modified android/.gradle/5.6.2/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified android/.gradle/5.6.2/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified android/.gradle/5.6.2/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions android/local.properties
@@ -1,5 +1,5 @@
sdk.dir=C:\\Users\\battn\\AppData\\Local\\Android\\sdk
flutter.sdk=P:\\FlutterSDK\\flutter
flutter.buildMode=release
flutter.versionName=1.0.3
flutter.versionCode=3
flutter.versionName=1.0.4
flutter.versionCode=4
6 changes: 4 additions & 2 deletions lib/pages/authors_page.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:share/share.dart';

final String VERSION = '1.0.3';
final String VERSION = '1.0.4';

class AuthorsPage extends StatelessWidget {
@override
Expand All @@ -22,7 +22,7 @@ class AuthorsPage extends StatelessWidget {
child: Container(
margin: EdgeInsets.only(left: 3.0, right: 3.0),
child: SizedBox(
height: 200,
height: 250,
child: Card(
child: Padding(
padding: EdgeInsets.all(12.0),
Expand All @@ -43,6 +43,8 @@ class AuthorsPage extends StatelessWidget {
children: <Widget>[
Text('Baza piosenek:', style: TextStyle(fontSize: 17.0, fontWeight: FontWeight.bold)),
Text('ks. Maciej Lewandowski'),
Text('&'),
Text('Stanisław Wołowski'),
],
),
Divider(),
Expand Down
33 changes: 25 additions & 8 deletions lib/pages/details_page.dart
Expand Up @@ -109,7 +109,6 @@ class _DetailPageState extends State<DetailPage> {

_changeChords(int type) {
bool isDur = false;
bool isSeven = false;

List<String> newCurrentChords = List<String>();

Expand All @@ -120,21 +119,31 @@ class _DetailPageState extends State<DetailPage> {
for (var currentChord in currentChords.split(' ')) {
currentChord = currentChord.trim();
String newChord = '';
String prefix = "", sufix = "";
bool isSeven = false;

if (currentChord != '') {
if (currentChord.length > 1) {
if (currentChord[0] == '(') {
prefix = "(";
currentChord = currentChord.substring(1, currentChord.length);
}
if (currentChord[currentChord.length-1] == ')') {
sufix = ")";
currentChord = currentChord.substring(0, currentChord.length-1);
}
if (currentChord.contains('7')) {
isSeven = true;
currentChord = currentChord.substring(0, currentChord.length-1);
}
}

if (_upperCases.contains(currentChord[0])) {
isDur = true;
} else {
isDur = false;
}

if (currentChord.length > 1 && currentChord.contains('7')) {
isSeven = true;
//currentChord = currentChord.substring(0, currentChord.length-2);
} else {
isSeven = false;
}

currentChord = currentChord.toLowerCase();
int index;
bool isChord = false;
Expand Down Expand Up @@ -162,6 +171,14 @@ class _DetailPageState extends State<DetailPage> {

if (isChord) {
newChord = _allChords[index];
if (prefix != "") {
newChord = prefix + newChord;
}

if (sufix != "") {
newChord += sufix;
}

if (isSeven) {
newChord += '7';
}
Expand Down
37 changes: 33 additions & 4 deletions lib/pages/home_page.dart
Expand Up @@ -12,7 +12,6 @@ import '../utils/main.dart';
import '../models/song_model.dart';
import '../models/settings_model.dart';


class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title, this.setThemeData}) : super(key: key);

Expand All @@ -28,6 +27,7 @@ class _MyHomePageState extends State<MyHomePage> {

final Function setThemeData;

bool _isLoadingFirst = false;
bool _isData = false;
bool _isText = false;
List<Song> _allSongs = <Song>[];
Expand Down Expand Up @@ -66,6 +66,9 @@ class _MyHomePageState extends State<MyHomePage> {

_getSongs() async {
bool reloaded = false;
setState(() {
_isLoadingFirst = true;
});

await http.get("http://malewand.vot.pl/spiewnik.php").then((response) { //http://malewand.vot.pl/spiewnik.php
if (response.statusCode == 200) {
Expand Down Expand Up @@ -126,6 +129,10 @@ class _MyHomePageState extends State<MyHomePage> {
});
});

setState(() {
_isLoadingFirst = false;
});

return reloaded;
}

Expand Down Expand Up @@ -280,7 +287,10 @@ class _MyHomePageState extends State<MyHomePage> {
),
Expanded(
child: Scrollbar(
child: ListView.builder(
child: _songs.length == 0 ?
Center(child: Text("Nie znaleziono takich piosenek.", style: TextStyle(fontSize: 20)))
:
ListView.builder(
itemCount: _songs.length,
itemBuilder: (BuildContext context, int index) {
return Card(
Expand Down Expand Up @@ -341,11 +351,30 @@ class _MyHomePageState extends State<MyHomePage> {
title: Text(widget.title),
actions: <Widget>[
IconButton(
icon: Icon(Icons.autorenew),
icon: Icon(Icons.info_outline),
onPressed: () {
_reloadSongs();
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: Text('Info'),
content: Text('Ilość piosenek w bazie: ' + _allSongs.length.toString()),
);
}
);
Utils.alertDuration(context);
},
),
Visibility(
child: IconButton(
icon: Icon(Icons.autorenew),
onPressed: () {
_reloadSongs();
},
),
visible: !_isLoadingFirst,
),
],
),
drawer: Drawer(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Expand Up @@ -11,7 +11,7 @@ description: Mobile app to show church songs and chords.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.3+3
version: 1.0.4+4

environment:
sdk: ">=2.1.0 <3.0.0"
Expand Down

0 comments on commit b1676d2

Please sign in to comment.