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

[Settings] Made the 'Save' button more obvious #98

Merged
merged 1 commit into from
Jan 30, 2020
Merged
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
14 changes: 12 additions & 2 deletions lib/pages/settings/subpages/automation/tabs/lidarr.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lunasea/configuration/values.dart';
import 'package:lunasea/logic/automation/lidarr.dart';
import 'package:lunasea/system/constants.dart';
import 'package:lunasea/system/ui.dart';

class Lidarr extends StatefulWidget {
Expand Down Expand Up @@ -38,10 +39,19 @@ class _State extends State<Lidarr> {
}

Widget _buildFloatingActionButton() {
return FloatingActionButton(
return FloatingActionButton.extended(
label: Text(
'Save',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
letterSpacing: Constants.LETTER_SPACING,
),
),
heroTag: null,
tooltip: 'Save Settings',
child: Elements.getIcon(Icons.save),
icon: Elements.getIcon(Icons.save),
backgroundColor: Colors.red,
onPressed: () async {
await Values.setLidarr(_lidarrValues);
Notifications.showSnackBar(_scaffoldKey, 'Settings saved');
Expand Down
14 changes: 12 additions & 2 deletions lib/pages/settings/subpages/automation/tabs/radarr.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lunasea/configuration/values.dart';
import 'package:lunasea/logic/automation/radarr.dart';
import 'package:lunasea/system/constants.dart';
import 'package:lunasea/system/ui.dart';

class Radarr extends StatefulWidget {
Expand Down Expand Up @@ -38,10 +39,19 @@ class _State extends State<Radarr> {
}

Widget _buildFloatingActionButton() {
return FloatingActionButton(
return FloatingActionButton.extended(
label: Text(
'Save',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
letterSpacing: Constants.LETTER_SPACING,
),
),
heroTag: null,
tooltip: 'Save Settings',
child: Elements.getIcon(Icons.save),
icon: Elements.getIcon(Icons.save),
backgroundColor: Colors.red,
onPressed: () async {
await Values.setRadarr(_radarrValues);
Notifications.showSnackBar(_scaffoldKey, 'Settings saved');
Expand Down
14 changes: 12 additions & 2 deletions lib/pages/settings/subpages/automation/tabs/sonarr.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lunasea/configuration/values.dart';
import 'package:lunasea/logic/automation/sonarr.dart';
import 'package:lunasea/system/constants.dart';
import 'package:lunasea/system/ui.dart';

class Sonarr extends StatefulWidget {
Expand Down Expand Up @@ -38,10 +39,19 @@ class _State extends State<Sonarr> {
}

Widget _buildFloatingActionButton() {
return FloatingActionButton(
return FloatingActionButton.extended(
label: Text(
'Save',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
letterSpacing: Constants.LETTER_SPACING,
),
),
heroTag: null,
tooltip: 'Save Settings',
child: Elements.getIcon(Icons.save),
icon: Elements.getIcon(Icons.save),
backgroundColor: Colors.red,
onPressed: () async {
await Values.setSonarr(_sonarrValues);
Notifications.showSnackBar(_scaffoldKey, 'Settings saved');
Expand Down
14 changes: 12 additions & 2 deletions lib/pages/settings/subpages/clients/tabs/nzbget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lunasea/configuration/values.dart';
import 'package:lunasea/logic/clients/nzbget.dart';
import 'package:lunasea/system/constants.dart';
import 'package:lunasea/system/ui.dart';

class NZBGet extends StatefulWidget {
Expand Down Expand Up @@ -38,10 +39,19 @@ class _State extends State<NZBGet> {
}

Widget _buildFloatingActionButton() {
return FloatingActionButton(
return FloatingActionButton.extended(
label: Text(
'Save',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
letterSpacing: Constants.LETTER_SPACING,
),
),
heroTag: null,
tooltip: 'Save Settings',
child: Elements.getIcon(Icons.save),
icon: Elements.getIcon(Icons.save),
backgroundColor: Colors.red,
onPressed: () async {
await Values.setNZBGet(_nzbgetValues);
Notifications.showSnackBar(_scaffoldKey, 'Settings saved');
Expand Down
14 changes: 12 additions & 2 deletions lib/pages/settings/subpages/clients/tabs/sabnzbd.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lunasea/configuration/values.dart';
import 'package:lunasea/logic/clients/sabnzbd.dart';
import 'package:lunasea/system/constants.dart';
import 'package:lunasea/system/ui.dart';

class SABnzbd extends StatefulWidget {
Expand Down Expand Up @@ -38,10 +39,19 @@ class _State extends State<SABnzbd> {
}

Widget _buildFloatingActionButton() {
return FloatingActionButton(
return FloatingActionButton.extended(
label: Text(
'Save',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
letterSpacing: Constants.LETTER_SPACING,
),
),
heroTag: null,
tooltip: 'Save Settings',
child: Elements.getIcon(Icons.save),
icon: Elements.getIcon(Icons.save),
backgroundColor: Colors.red,
onPressed: () async {
await Values.setSabnzbd(_sabnzbdValues);
Notifications.showSnackBar(_scaffoldKey, 'Settings saved');
Expand Down