Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a shortcut to system equalizer. (Only works on android) #334

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- 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
2 changes: 2 additions & 0 deletions lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@
"@audioService": {},
"layoutAndTheme": "Aufbau & Thema",
"@layoutAndTheme": {},
"equalizer": "Equalizer",
"@equalizer": {},
"transcoding": "Transkodierung",
"@transcoding": {},
"enableTranscodingSubtitle": "Falls aktiviert, werden Musikstreams vom Server transkodiert.",
Expand Down
2 changes: 2 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@
"downloadLocations": "Download Locations",
"audioService": "Audio Service",
"layoutAndTheme": "Layout & Theme",
"equalizer": "Equalizer",
"@equalizer": {},
"notAvailableInOfflineMode": "Not available in offline mode",
"logOut": "Log Out",
"downloadedSongsWillNotBeDeleted": "Downloaded songs will not be deleted",
Expand Down
11 changes: 11 additions & 0 deletions lib/screens/settings_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'dart:io' show Platform;

import '../services/finamp_settings_helper.dart';
import 'transcoding_settings_screen.dart';
Expand All @@ -9,6 +10,8 @@ import 'audio_service_settings_screen.dart';
import 'layout_settings_screen.dart';
import '../components/SettingsScreen/logout_list_tile.dart';
import 'view_selector.dart';
import 'package:equalizer/equalizer.dart';


class SettingsScreen extends StatelessWidget {
const SettingsScreen({Key? key}) : super(key: key);
Expand Down Expand Up @@ -76,6 +79,14 @@ class SettingsScreen extends StatelessWidget {
onTap: () =>
Navigator.of(context).pushNamed(ViewSelector.routeName),
),
ListTile(
leading: const Icon(Icons.bar_chart),
enabled: Platform.isAndroid,
title: Text(AppLocalizations.of(context)!.equalizer),
onTap: () {
Equalizer.open(0);
},
),
const LogoutListTile(),
],
),
Expand Down
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ dependencies:
intl: ^0.17.0
auto_size_text: ^3.0.0
flutter_riverpod: ^1.0.4
equalizer:
git:
url: https://github.com/Y0ngg4n/equalizer.git

dev_dependencies:
flutter_test:
Expand Down