diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index cdfe3b7..45d78f0 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -127,7 +127,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140c..3db53b6 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ { .replaceAll('.', ' ') .replaceAll('/', ' ') .replaceAll(':', ' '); - //TODO Do something efficient to choose only alpha-numeric characters from $title var filePath = _raagDownloadsDirectory.path + '/' + tempTitle + '.mp3'; if (streamInfo != null) { @@ -170,14 +169,14 @@ class _DownloadMusicState extends State { context: context, title: 'File error', desc: - 'Raag was unable to create a file. Try changing the download location from settings and try again', + unable, type: AlertType.error, style: Styles.alertStyle(context), buttons: [ DialogButton( color: Theme.of(context).colorScheme.secondary, child: Text( - "Settings", + settings, style: TextStyle(color: Colors.white, fontSize: 20), ), onPressed: () { @@ -193,7 +192,7 @@ class _DownloadMusicState extends State { DialogButton( color: Theme.of(context).colorScheme.secondary, child: Text( - "Cancel", + cancel, style: TextStyle(color: Colors.white, fontSize: 20), ), onPressed: () => Navigator.pop(context)) @@ -206,7 +205,7 @@ class _DownloadMusicState extends State { print("Exception: $e\nStack Trace: $s"); Alert( context: context, - title: 'Unknown error', + title: unkownError, desc: '$e', type: AlertType.error, style: Styles.alertStyle(context)) @@ -233,7 +232,8 @@ class _DownloadMusicState extends State { leading: IconButton( icon: Icon(Icons.arrow_back_ios_outlined), onPressed: () => Navigator.pop(context)), - title: Text("Download music", + title: Text( + downloadMus, style: Theme.of(context).textTheme.headline3), centerTitle: true, actions: [ diff --git a/lib/view/home_scaffold.dart b/lib/view/home_scaffold.dart index f315344..6923434 100644 --- a/lib/view/home_scaffold.dart +++ b/lib/view/home_scaffold.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:provider/provider.dart'; import 'package:raag/provider/settings_provider.dart'; diff --git a/lib/view/onboarding.dart b/lib/view/onboarding.dart index b64d85c..d31d002 100644 --- a/lib/view/onboarding.dart +++ b/lib/view/onboarding.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:raag/model/strings.dart'; import 'package:raag/provider/theme.dart'; import 'package:raag/widgets/intro_widget.dart'; +import 'package:raag/model/strings.dart'; import 'home_scaffold.dart'; @@ -54,7 +54,7 @@ class _OnBoardingState extends State { type: appName, startGradientColor: Theme.of(context).colorScheme.secondary, endGradientColor: Colors.deepPurple, - subText: 'The Millennial\'s music app'), + subText: millenium), IntroWidget( screenWidth: screenWidth, screenHeight: screenHeight, @@ -62,7 +62,7 @@ class _OnBoardingState extends State { type: 'Listen', startGradientColor: hex('407BFF'), endGradientColor: hex('004DFF'), - subText: 'Listen to all your songs in one place'), + subText: allSongs), IntroWidget( screenWidth: screenWidth, screenHeight: screenHeight, @@ -70,7 +70,7 @@ class _OnBoardingState extends State { type: 'Download', startGradientColor: hex('FF725E'), endGradientColor: hex('FF1A00'), - subText: 'YouTube to your device. No strings'), + subText: youtube), ]; List _buildPageIndicator() { @@ -120,7 +120,7 @@ class _OnBoardingState extends State { curve: Curves.ease); }, child: Text( - 'Skip', + skip, style: Theme.of(context).textTheme.headline3, )), ), diff --git a/lib/view/settings.dart b/lib/view/settings.dart index ed817dd..5a8b850 100644 --- a/lib/view/settings.dart +++ b/lib/view/settings.dart @@ -5,6 +5,7 @@ import 'package:raag/provider/settings_provider.dart'; import 'package:raag/widgets/download_location_button_settings.dart'; import 'package:raag/widgets/refresh_button.dart'; import 'package:raag/widgets/theme_button.dart'; +import 'package:raag/model/strings.dart'; class Settings extends StatelessWidget { @override @@ -27,7 +28,7 @@ class Settings extends StatelessWidget { pinned: true, snap: true, flexibleSpace: FlexibleSpaceBar( - title: Text('Settings', + title: Text(settings, style: Theme.of(context).textTheme.headline1), ), ), diff --git a/lib/view/youtube_search.dart b/lib/view/youtube_search.dart index 7cf961e..9285196 100644 --- a/lib/view/youtube_search.dart +++ b/lib/view/youtube_search.dart @@ -1,6 +1,6 @@ import 'dart:async'; import 'dart:io'; - +import 'package:raag/model/strings.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:fluttertoast/fluttertoast.dart'; @@ -131,7 +131,7 @@ class NavigationControls extends StatelessWidget { if (await controller.canGoBack()) { await controller.goBack(); } else { - Fluttertoast.showToast(msg: 'No page in history'); + Fluttertoast.showToast(msg: noPageHistory); } }, ), @@ -143,7 +143,7 @@ class NavigationControls extends StatelessWidget { if (await controller.canGoForward()) { await controller.goForward(); } else { - Fluttertoast.showToast(msg: 'No page to go forward'); + Fluttertoast.showToast(msg: noForward); } }, ), diff --git a/lib/widgets/download_location_button_settings.dart b/lib/widgets/download_location_button_settings.dart index 5b8ea96..0036407 100644 --- a/lib/widgets/download_location_button_settings.dart +++ b/lib/widgets/download_location_button_settings.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:provider/provider.dart'; import 'package:raag/provider/settings_provider.dart'; +import 'package:raag/model/strings.dart'; class DownloadLocationButton extends StatelessWidget { @override @@ -17,11 +18,11 @@ class DownloadLocationButton extends StatelessWidget { provider.appStorage = false; Fluttertoast.showToast( msg: - 'Downloaded files will be stored to \nAndroid/Data/in.amfoss.raag/files\nUse a File manager to move to your preferred location', + willBeStored, toastLength: Toast.LENGTH_LONG); } else { Fluttertoast.showToast( - msg: 'Downloaded files will be stored to \nDownload/Raag/', + msg: y, toastLength: Toast.LENGTH_LONG); provider.appStorage = true; } @@ -43,13 +44,13 @@ class DownloadLocationButton extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Download Location', + downloadedLocation, style: Theme.of(context).textTheme.headline3, ), Text( provider.appStorage == true - ? 'Storage/Download/Raag' - : 'Android/Data/in.amfoss.raag/files/', + ? d + : e, style: Theme.of(context).textTheme.subtitle2, ) ], diff --git a/lib/widgets/loading_indicator.dart b/lib/widgets/loading_indicator.dart index a2fd354..c887b48 100644 --- a/lib/widgets/loading_indicator.dart +++ b/lib/widgets/loading_indicator.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:raag/model/strings.dart'; class LoadingIndicator extends StatelessWidget { @override @@ -22,7 +23,7 @@ class LoadingIndicator extends StatelessWidget { width: 20, ), Text( - "Loading", + loading, style: Theme.of(context).textTheme.headline3, ) ], diff --git a/lib/widgets/my_music_list.dart b/lib/widgets/my_music_list.dart index 9328bde..76f5e10 100644 --- a/lib/widgets/my_music_list.dart +++ b/lib/widgets/my_music_list.dart @@ -3,6 +3,7 @@ import 'package:raag/model/music_model.dart'; import 'package:raag/provider/db_provider.dart'; import 'package:raag/widgets/loading_indicator.dart'; import 'package:raag/widgets/song_widget.dart'; +import 'package:raag/model/strings.dart'; class MyMusicList extends StatelessWidget { @override @@ -18,7 +19,7 @@ class MyMusicList extends StatelessWidget { } else if (songInfo?.isEmpty ?? true) { return Center( child: Text( - 'No music files found :(', + noNewMusic, style: Theme.of(context).textTheme.subtitle1, )); } diff --git a/lib/widgets/refresh_button.dart b/lib/widgets/refresh_button.dart index 13d890a..0605b28 100644 --- a/lib/widgets/refresh_button.dart +++ b/lib/widgets/refresh_button.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:raag/provider/db_provider.dart'; import 'package:raag/view/splash_screen.dart'; +import 'package:raag/model/strings.dart'; class RefreshButton extends StatelessWidget { @override @@ -15,10 +16,10 @@ class RefreshButton extends StatelessWidget { return AlertDialog( backgroundColor: Theme.of(context).backgroundColor, title: Text( - 'Refreshing DB', + refreshingDB, style: Theme.of(context).textTheme.headline3, ), - content: Text('Looking for new songs')); + content: Text(newSongs)); }, ); } @@ -32,7 +33,7 @@ class RefreshButton extends StatelessWidget { // _preferencesProvider.setBool(Preferences.DB_POPULATED, false); await SplashScreen.populateSongsIntoDB(); var _diff = await DBProvider.db.getCount() - _oldCount; - var toastText = (_diff < 0) ? ' songs removed' : ' new songs added'; + var toastText = (_diff < 0) ? songsRemoved : newSongsAdded; Navigator.of(context).pop(); Fluttertoast.showToast(msg: (_diff).toString() + toastText); }, @@ -50,7 +51,7 @@ class RefreshButton extends StatelessWidget { width: screenWidth * 0.04, ), Text( - 'Refresh Songs', + refreshSongs, style: Theme.of(context).textTheme.headline3, ) ]), diff --git a/lib/widgets/theme_button.dart b/lib/widgets/theme_button.dart index 34b375a..0bb996b 100644 --- a/lib/widgets/theme_button.dart +++ b/lib/widgets/theme_button.dart @@ -1,10 +1,9 @@ import 'package:animated_icon_button/animated_icon_button.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/painting.dart'; import 'package:provider/provider.dart'; import 'package:raag/provider/settings_provider.dart'; import 'package:raag/provider/theme.dart'; - +import 'package:raag/model/strings.dart'; class ThemeButton extends StatefulWidget { @override _ThemeButtonState createState() => _ThemeButtonState(); @@ -65,7 +64,7 @@ class _ThemeButtonState extends State width: screenWidth * 0.04, ), Text( - 'Dark Theme', + darktheme, style: Theme.of(context).textTheme.headline3, ), SizedBox( diff --git a/pubspec.lock b/pubspec.lock index 86db5bb..3f65546 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,7 +21,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.1" + version: "2.8.2" audio_manager: dependency: "direct main" description: @@ -63,7 +63,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: @@ -260,7 +260,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: @@ -496,7 +496,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.3" typed_data: dependency: transitive description: @@ -510,7 +510,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" webview_flutter: dependency: "direct main" description: @@ -547,5 +547,5 @@ packages: source: hosted version: "1.10.6" sdks: - dart: ">=2.13.0 <3.0.0" + dart: ">=2.14.0 <3.0.0" flutter: ">=1.24.0-10" diff --git a/test/widget_test.dart b/test/widget_test.dart index 821213d..6795adc 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -7,10 +7,8 @@ import 'package:flutter_test/flutter_test.dart'; - void main() { testWidgets('Dummy test', (WidgetTester tester) async { expect(1, 1); - //TODO Write proper test }); }