aboutsummaryrefslogtreecommitdiff
path: root/lib/views/settings_view.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/views/settings_view.dart')
-rw-r--r--lib/views/settings_view.dart37
1 files changed, 3 insertions, 34 deletions
diff --git a/lib/views/settings_view.dart b/lib/views/settings_view.dart
index 7268acf..c4cd1ce 100644
--- a/lib/views/settings_view.dart
+++ b/lib/views/settings_view.dart
@@ -17,7 +17,6 @@ class SettingsView extends StatefulWidget {
class SettingsViewState extends State<SettingsView> {
final TextEditingController _controller = TextEditingController();
- final FocusNode _focusNode = FocusNode();
@override
void initState() {
@@ -83,11 +82,11 @@ class SettingsViewState extends State<SettingsView> {
trailing: ElevatedButton(
child: Text(AppLocalizations.of(context)!.option312, style: cOptionTextStyle.copyWith(color: cIconColor)),
onPressed: () async {
- final _file = await FileHandler.pickDeserializableFile(context);
+ final file = await FileHandler.pickDeserializableFile(context);
- if (_file == null) return;
+ if (file == null) return;
- await FileHandler.deserializeFile(context, _file);
+ await FileHandler.deserializeFile(context, file);
setState(() {});
},
@@ -99,36 +98,6 @@ class SettingsViewState extends State<SettingsView> {
);
}
- void _updateSettings(String? text) {
- _focusNode.unfocus();
-
- if (text != null) {
- SettingsData.settings["serverURL"] = text;
- SettingsData.save();
- }
- }
-
-/*
- // TODO: Use later in direct settings?
- Widget _buildServerIPInput() {
- if (MediaQuery.of(context).viewInsets.bottom == 0) _updateSettings(null);
-
- return Container(
- width: 150.0,
- child: TextFormField(
- keyboardType: TextInputType.url,
- controller: _controller,
- style: cRecipeTextStyle,
- focusNode: _focusNode,
- cursorColor: cPrimaryColor,
- onEditingComplete: () {
- _updateSettings(_controller.text);
- },
- ),
- );
- }
-*/
-
Widget _buildPhotoSourceDropDownButton() {
return DropdownButton(
value: int.parse(SettingsData.settings["photoSource"]!),