code fixes:
- remove unused imports - remove clipboard plugin and directly use flutter's clipboard class - replace deprecated stuff
This commit is contained in:
parent
3105ed6c1d
commit
519adc910f
|
|
@ -1,9 +1,6 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:freezer/api/deezer.dart';
|
||||
import 'package:freezer/api/definitions.dart';
|
||||
import 'package:freezer/ui/details_screens.dart';
|
||||
import 'package:freezer/ui/library.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import 'package:freezer/api/spotify.dart';
|
|||
import 'package:freezer/settings.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
import 'dart:async';
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ class DeezerAPI {
|
|||
"Accept-Charset": "utf-8,ISO-8859-1;q=0.7,*;q=0.3",
|
||||
"Accept-Language": "${settings.deezerLanguage??"en"}-${settings.deezerCountry??'US'},${settings.deezerLanguage??"en"};q=0.9,en-US;q=0.8,en;q=0.7",
|
||||
"Connection": "keep-alive",
|
||||
"Cookie": "arl=${arl}" + ((sid == null) ? '' : '; sid=${sid}')
|
||||
"Cookie": "arl=$arl" + ((sid == null) ? '' : '; sid=$sid')
|
||||
};
|
||||
|
||||
//Call private API
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ class Artist {
|
|||
Map<dynamic, dynamic> json, {
|
||||
Map<dynamic, dynamic> albumsJson = const {},
|
||||
Map<dynamic, dynamic> topJson = const {},
|
||||
Map<dynamic, dynamic> highlight = null,
|
||||
Map<dynamic, dynamic> highlight,
|
||||
bool library = false
|
||||
}) {
|
||||
//Get wether radio is available
|
||||
|
|
|
|||
|
|
@ -373,14 +373,14 @@ class _MainScreenState extends State<MainScreen> with SingleTickerProviderStateM
|
|||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home),
|
||||
title: Text('Home'.i18n)),
|
||||
label: 'Home'.i18n),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.search),
|
||||
title: Text('Search'.i18n),
|
||||
label: 'Search'.i18n,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.library_music),
|
||||
title: Text('Library'.i18n))
|
||||
label: 'Library'.i18n)
|
||||
],
|
||||
)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -213,8 +213,8 @@ class Settings {
|
|||
case AudioQuality.MP3_128: return 1;
|
||||
case AudioQuality.MP3_320: return 3;
|
||||
case AudioQuality.FLAC: return 9;
|
||||
default: return 8;
|
||||
}
|
||||
return 8; //default
|
||||
}
|
||||
|
||||
//Check if is dark, can't use theme directly, because of system themes, and Theme.of(context).brightness broke
|
||||
|
|
@ -242,6 +242,7 @@ class Settings {
|
|||
sliderTheme: _sliderTheme,
|
||||
toggleableActiveColor: primaryColor,
|
||||
bottomAppBarColor: Color(0xfff5f5f5),
|
||||
appBarTheme: AppBarTheme(brightness: Brightness.light),
|
||||
),
|
||||
Themes.Dark: ThemeData(
|
||||
textTheme: _textTheme,
|
||||
|
|
@ -251,6 +252,7 @@ class Settings {
|
|||
accentColor: primaryColor,
|
||||
sliderTheme: _sliderTheme,
|
||||
toggleableActiveColor: primaryColor,
|
||||
appBarTheme: AppBarTheme(brightness: Brightness.dark),
|
||||
),
|
||||
Themes.Deezer: ThemeData(
|
||||
textTheme: _textTheme,
|
||||
|
|
@ -267,6 +269,7 @@ class Settings {
|
|||
bottomSheetTheme: BottomSheetThemeData(
|
||||
backgroundColor: deezerBottom
|
||||
),
|
||||
appBarTheme: AppBarTheme(brightness: Brightness.dark),
|
||||
cardColor: deezerBg
|
||||
),
|
||||
Themes.Black: ThemeData(
|
||||
|
|
@ -283,7 +286,8 @@ class Settings {
|
|||
toggleableActiveColor: primaryColor,
|
||||
bottomSheetTheme: BottomSheetThemeData(
|
||||
backgroundColor: Colors.black,
|
||||
)
|
||||
),
|
||||
appBarTheme: AppBarTheme(brightness: Brightness.dark),
|
||||
)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:palette_generator/palette_generator.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
|
|
@ -114,7 +113,7 @@ class _ZoomableImageState extends State<ZoomableImage> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ctx = context;
|
||||
return FlatButton(
|
||||
return TextButton(
|
||||
child: CachedImage(
|
||||
url: widget.url,
|
||||
rounded: widget.rounded,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:draggable_scrollbar/draggable_scrollbar.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttericon/font_awesome5_icons.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
|
|
@ -21,7 +18,7 @@ import 'menu.dart';
|
|||
|
||||
class AlbumDetails extends StatefulWidget {
|
||||
|
||||
Album album;
|
||||
final Album album;
|
||||
AlbumDetails(this.album, {Key key}): super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -165,7 +162,7 @@ class _AlbumDetailsState extends State<AlbumDetails> {
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon((album.library??false)? Icons.favorite : Icons.favorite_border, size: 32),
|
||||
|
|
@ -196,7 +193,7 @@ class _AlbumDetailsState extends State<AlbumDetails> {
|
|||
},
|
||||
),
|
||||
MakeAlbumOffline(album: album),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(Icons.file_download, size: 32.0,),
|
||||
|
|
@ -248,7 +245,7 @@ class _AlbumDetailsState extends State<AlbumDetails> {
|
|||
|
||||
class MakeAlbumOffline extends StatefulWidget {
|
||||
|
||||
Album album;
|
||||
final Album album;
|
||||
MakeAlbumOffline({Key key, this.album}): super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -266,6 +263,7 @@ class _MakeAlbumOfflineState extends State<MakeAlbumOffline> {
|
|||
_offline = v;
|
||||
});
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -399,7 +397,7 @@ class ArtistDetails extends StatelessWidget {
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(Icons.favorite, size: 32),
|
||||
|
|
@ -417,7 +415,7 @@ class ArtistDetails extends StatelessWidget {
|
|||
},
|
||||
),
|
||||
if ((artist.radio??false))
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(Icons.radio, size: 32),
|
||||
|
|
@ -714,7 +712,7 @@ class _DiscographyScreenState extends State<DiscographyScreen> {
|
|||
|
||||
class PlaylistDetails extends StatefulWidget {
|
||||
|
||||
Playlist playlist;
|
||||
final Playlist playlist;
|
||||
PlaylistDetails(this.playlist, {Key key}): super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -1060,7 +1058,7 @@ class _PlaylistDetailsState extends State<PlaylistDetails> {
|
|||
}
|
||||
|
||||
class MakePlaylistOffline extends StatefulWidget {
|
||||
Playlist playlist;
|
||||
final Playlist playlist;
|
||||
MakePlaylistOffline(this.playlist, {Key key}): super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -1077,6 +1075,7 @@ class _MakePlaylistOfflineState extends State<MakePlaylistOffline> {
|
|||
_offline = v;
|
||||
});
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -1115,7 +1114,7 @@ class _MakePlaylistOfflineState extends State<MakePlaylistOffline> {
|
|||
|
||||
class ShowScreen extends StatefulWidget {
|
||||
|
||||
Show show;
|
||||
final Show show;
|
||||
ShowScreen(this.show, {Key key}): super(key: key);
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -239,11 +239,11 @@ class DownloadTile extends StatelessWidget {
|
|||
title: Text('Delete'.i18n),
|
||||
content: Text('Are you sure you want to delete this download?'.i18n),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Cancel'.i18n),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Delete'.i18n),
|
||||
onPressed: () async {
|
||||
await downloadManager.removeDownload(download.id);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:freezer/api/deezer.dart';
|
||||
import 'package:freezer/api/definitions.dart';
|
||||
import 'package:freezer/api/player.dart';
|
||||
import 'package:freezer/main.dart';
|
||||
import 'package:freezer/ui/elements.dart';
|
||||
import 'package:freezer/ui/error.dart';
|
||||
import 'package:freezer/ui/menu.dart';
|
||||
|
|
@ -180,7 +179,7 @@ class HomepageSectionWidget extends StatelessWidget {
|
|||
//Has more items
|
||||
if (j == section.items.length) {
|
||||
if (section.hasMore ?? false) {
|
||||
return FlatButton(
|
||||
return TextButton(
|
||||
child: Text(
|
||||
'Show more'.i18n,
|
||||
textAlign: TextAlign.center,
|
||||
|
|
@ -217,7 +216,7 @@ class HomepageSectionWidget extends StatelessWidget {
|
|||
|
||||
class HomePageItemWidget extends StatelessWidget {
|
||||
|
||||
HomePageItem item;
|
||||
final HomePageItem item;
|
||||
HomePageItemWidget(this.item);
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:freezer/api/deezer.dart';
|
||||
import 'package:freezer/api/definitions.dart';
|
||||
|
|
@ -141,9 +140,8 @@ class _ImporterWidgetState extends State<ImporterWidget> {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
RaisedButton(
|
||||
ElevatedButton(
|
||||
child: Text('Convert'.i18n),
|
||||
color: Theme.of(context).primaryColor,
|
||||
onPressed: () {
|
||||
spotify.convertPlaylist(widget.playlist);
|
||||
Navigator.of(context).pushReplacement(MaterialPageRoute(
|
||||
|
|
@ -151,9 +149,8 @@ class _ImporterWidgetState extends State<ImporterWidget> {
|
|||
));
|
||||
},
|
||||
),
|
||||
RaisedButton(
|
||||
ElevatedButton(
|
||||
child: Text('Download only'.i18n),
|
||||
color: Theme.of(context).primaryColor,
|
||||
onPressed: () async {
|
||||
//Ask for quality
|
||||
AudioQuality quality;
|
||||
|
|
@ -263,7 +260,7 @@ class CurrentlyImportingScreen extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
if (snapshot.data != null)
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Playlist menu'.i18n),
|
||||
onPressed: () async {
|
||||
Playlist p = await deezerAPI.playlist(snapshot.data);
|
||||
|
|
|
|||
1236
lib/ui/library.dart
1236
lib/ui/library.dart
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:freezer/main.dart';
|
||||
import 'package:wakelock/wakelock.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -697,14 +696,14 @@ class _SleepTimerDialogState extends State<SleepTimerDialog> {
|
|||
],
|
||||
),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Dismiss'.i18n),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
if (cache.sleepTimer != null)
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Cancel current timer'.i18n),
|
||||
onPressed: () {
|
||||
cache.sleepTimer.cancel();
|
||||
|
|
@ -714,7 +713,7 @@ class _SleepTimerDialogState extends State<SleepTimerDialog> {
|
|||
},
|
||||
),
|
||||
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Save'.i18n),
|
||||
onPressed: () {
|
||||
Duration duration = Duration(hours: hours, minutes: minutes);
|
||||
|
|
@ -891,11 +890,11 @@ class _CreatePlaylistDialogState extends State<CreatePlaylistDialog> {
|
|||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Cancel'.i18n),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text(edit ? 'Update'.i18n : 'Create'.i18n),
|
||||
onPressed: () async {
|
||||
if (edit) {
|
||||
|
|
|
|||
|
|
@ -63,13 +63,15 @@ class _PlayerScreenState extends State<PlayerScreen> {
|
|||
if (settings.blurPlayerBackground)
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: palette.dominantColor.color.withOpacity(0.25),
|
||||
systemNavigationBarColor: Color.alphaBlend(palette.dominantColor.color.withOpacity(0.25), Theme.of(context).scaffoldBackgroundColor)
|
||||
systemNavigationBarColor: Color.alphaBlend(palette.dominantColor.color.withOpacity(0.25), Theme.of(context).scaffoldBackgroundColor),
|
||||
systemNavigationBarIconBrightness: ThemeData.estimateBrightnessForColor(palette.dominantColor.color) == Brightness.light ? Brightness.dark : Brightness.light
|
||||
));
|
||||
|
||||
//Color gradient
|
||||
if (!settings.blurPlayerBackground) {
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: palette.dominantColor.color.withOpacity(0.7),
|
||||
statusBarIconBrightness: ThemeData.estimateBrightnessForColor(palette.dominantColor.color.withOpacity(0.7)) == Brightness.light ? Brightness.dark : Brightness.light
|
||||
));
|
||||
setState(() => _bgGradient = LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
|
|
@ -425,7 +427,7 @@ class _QualityInfoWidgetState extends State<QualityInfoWidget> {
|
|||
_load();
|
||||
if (streamSubscription == null)
|
||||
streamSubscription = AudioService.currentMediaItemStream.listen((event) async {
|
||||
await _load();
|
||||
_load();
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
|
@ -439,7 +441,7 @@ class _QualityInfoWidgetState extends State<QualityInfoWidget> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FlatButton(
|
||||
return TextButton(
|
||||
child: Text(value),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(MaterialPageRoute(builder: (context) => QualitySettings()));
|
||||
|
|
@ -641,10 +643,10 @@ class _BigAlbumArtState extends State<BigAlbumArt> {
|
|||
//Top row containing QueueSource, queue...
|
||||
class PlayerScreenTopRow extends StatelessWidget {
|
||||
|
||||
double textSize;
|
||||
double iconSize;
|
||||
double textWidth;
|
||||
bool short;
|
||||
final double textSize;
|
||||
final double iconSize;
|
||||
final double textWidth;
|
||||
final bool short;
|
||||
PlayerScreenTopRow({this.textSize, this.iconSize, this.textWidth, this.short});
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import 'package:flutter/src/services/keyboard_key.dart';
|
|||
import 'package:freezer/api/cache.dart';
|
||||
import 'package:freezer/api/download.dart';
|
||||
import 'package:freezer/api/player.dart';
|
||||
import 'package:freezer/main.dart';
|
||||
import 'package:freezer/ui/details_screens.dart';
|
||||
import 'package:freezer/ui/elements.dart';
|
||||
import 'package:freezer/ui/home_screen.dart';
|
||||
|
|
@ -59,7 +58,7 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
List _suggestions = [];
|
||||
bool _cancel = false;
|
||||
bool _showCards = true;
|
||||
FocusNode _focus = FocusNode();
|
||||
//FocusNode _focus = FocusNode();
|
||||
|
||||
void _submit(BuildContext context, {String query}) async {
|
||||
if (query != null) _query = query;
|
||||
|
|
@ -94,7 +93,7 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
}
|
||||
|
||||
//Load search suggestions
|
||||
Future<List<String>> _loadSuggestions() async {
|
||||
Future<void> _loadSuggestions() async {
|
||||
if (_query == null || _query.length < 2 || _query.startsWith('http')) return null;
|
||||
String q = _query;
|
||||
await Future.delayed(Duration(milliseconds: 300));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:audio_service/audio_service.dart';
|
|||
import 'package:country_pickers/country.dart';
|
||||
import 'package:country_pickers/country_picker_dialog.dart';
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||
|
|
@ -23,7 +22,6 @@ import 'package:package_info/package_info.dart';
|
|||
import 'package:path_provider_ex/path_provider_ex.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:freezer/translations.i18n.dart';
|
||||
import 'package:clipboard/clipboard.dart';
|
||||
import 'package:scrobblenaut/scrobblenaut.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
|
@ -106,7 +104,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||
title: Text('Language'.i18n),
|
||||
content: Text('Language changed, please restart Freezer to apply!'.i18n),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('OK'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
|
|
@ -387,7 +385,7 @@ class _FontSelectorState extends State<FontSelector> {
|
|||
title: Text('Warning'.i18n),
|
||||
content: Text("This app isn't made for supporting many fonts, it can break layouts and overflow. Use at your own risk!".i18n),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
setState(() => settings.font = font);
|
||||
await settings.save();
|
||||
|
|
@ -398,7 +396,7 @@ class _FontSelectorState extends State<FontSelector> {
|
|||
},
|
||||
child: Text('Apply'.i18n),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
widget.callback();
|
||||
|
|
@ -739,8 +737,8 @@ class _DeezerSettingsState extends State<DeezerSettings> {
|
|||
|
||||
class FilenameTemplateDialog extends StatefulWidget {
|
||||
|
||||
String initial;
|
||||
Function onSave;
|
||||
final String initial;
|
||||
final Function onSave;
|
||||
FilenameTemplateDialog(this.initial, this.onSave, {Key key}): super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -782,22 +780,22 @@ class _FilenameTemplateDialogState extends State<FilenameTemplateDialog> {
|
|||
],
|
||||
),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Cancel'.i18n),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Reset'.i18n),
|
||||
onPressed: () {
|
||||
_controller.value = _controller.value.copyWith(text: '%artist% - %title%');
|
||||
_new = '%artist% - %title%';
|
||||
},
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Clear'.i18n),
|
||||
onPressed: () => _controller.clear(),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Save'.i18n),
|
||||
onPressed: () async {
|
||||
widget.onSave(_new);
|
||||
|
|
@ -907,7 +905,7 @@ class _DownloadsSettingsState extends State<DownloadsSettings> {
|
|||
title: Text('Warning'.i18n),
|
||||
content: Text('Using too many concurrent downloads on older/weaker devices might cause crashes!'.i18n),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Dismiss'.i18n),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
)
|
||||
|
|
@ -1195,7 +1193,7 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
|||
subtitle: Text('Copy userToken/ARL Cookie for use in other apps.'.i18n),
|
||||
leading: Icon(Icons.lock),
|
||||
onTap: () async {
|
||||
await FlutterClipboard.copy(settings.arl);
|
||||
Clipboard.setData(ClipboardData(text: settings.arl));
|
||||
await Fluttertoast.showToast(
|
||||
msg: 'Copied'.i18n,
|
||||
);
|
||||
|
|
@ -1251,7 +1249,7 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
|||
// content: Text('Due to plugin incompatibility, login using browser is unavailable without restart.'.i18n),
|
||||
content: Text('Restart of app is required to properly log out!'.i18n),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Cancel'.i18n),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
|
|
@ -1262,7 +1260,7 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
|||
// Navigator.of(context).pop();
|
||||
// },
|
||||
// ),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Log out & Exit'.i18n),
|
||||
onPressed: () async {
|
||||
try {AudioService.stop();} catch (e) {}
|
||||
|
|
@ -1329,11 +1327,11 @@ class _LastFMLoginState extends State<LastFMLogin> {
|
|||
],
|
||||
),
|
||||
actions: [
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Cancel'.i18n),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: Text('Login'.i18n),
|
||||
onPressed: () async {
|
||||
LastFM last;
|
||||
|
|
@ -1398,7 +1396,6 @@ class _DirectoryPickerState extends State<DirectoryPicker> {
|
|||
IconButton(
|
||||
icon: Icon(Icons.sd_card),
|
||||
onPressed: () {
|
||||
String path = '';
|
||||
//Chose storage
|
||||
showDialog(
|
||||
context: context,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:freezer/api/cache.dart';
|
||||
|
|
@ -168,12 +167,12 @@ class _UpdaterScreenState extends State<UpdaterScreen> {
|
|||
//Available download
|
||||
if (_versionDownload != null)
|
||||
Column(children: [
|
||||
RaisedButton(
|
||||
ElevatedButton(
|
||||
child: Text('Download'.i18n + ' (${_versionDownload.version})'),
|
||||
onPressed: _buttonEnabled ? () {
|
||||
setState(() => _buttonEnabled = false);
|
||||
_download();
|
||||
}:null
|
||||
} : null
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ dependencies:
|
|||
marquee: ^1.5.2
|
||||
flutter_cache_manager: ^1.4.1
|
||||
cached_network_image: ^2.3.2+1
|
||||
clipboard: ^0.1.2+8
|
||||
i18n_extension: ^4.0.0
|
||||
fluttericon: ^1.0.7
|
||||
url_launcher: ^5.7.2
|
||||
|
|
|
|||
Loading…
Reference in a new issue