style: sort imports

This commit is contained in:
Aunali321 2023-04-19 01:32:43 +05:30
parent 4c9cb560e3
commit c9adf1c492
3 changed files with 8 additions and 7 deletions

View File

@ -12,7 +12,8 @@ import 'package:stacked/stacked.dart';
class SManageKeystorePassword extends BaseViewModel {
final ManagerAPI _managerAPI = locator<ManagerAPI>();
final TextEditingController _keystorePasswordController = TextEditingController();
final TextEditingController _keystorePasswordController =
TextEditingController();
Future<void> showKeystoreDialog(BuildContext context) async {
final String keystorePasswordText = _managerAPI.getKeystorePassword();
@ -26,7 +27,8 @@ class SManageKeystorePassword extends BaseViewModel {
const Spacer(),
IconButton(
icon: const Icon(Icons.manage_history_outlined),
onPressed: () =>_keystorePasswordController.text = _managerAPI.defaultKeystorePassword,
onPressed: () => _keystorePasswordController.text =
_managerAPI.defaultKeystorePassword,
color: Theme.of(context).colorScheme.secondary,
)
],
@ -38,7 +40,7 @@ class SManageKeystorePassword extends BaseViewModel {
CustomTextField(
inputController: _keystorePasswordController,
label: I18nText('settingsView.selectKeystorePassword'),
hint: "",
hint: '',
onChanged: (value) => notifyListeners(),
),
],
@ -56,7 +58,7 @@ class SManageKeystorePassword extends BaseViewModel {
CustomMaterialButton(
label: I18nText('okButton'),
onPressed: () {
String passwd = _keystorePasswordController.text;
final String passwd = _keystorePasswordController.text;
_managerAPI.setKeystorePassword(passwd);
Navigator.of(context).pop();
},

View File

@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_api_url.dart';
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_sources.dart';
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_keystore_password.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_experimental_patches.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_experimental_universal_patches.dart';

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_keystore_password.dart';
import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_section.dart';
final _settingsViewModel = SettingsViewModel();
@ -72,7 +72,7 @@ class SExportSection extends StatelessWidget {
),
),
subtitle: I18nText('settingsView.importKeystoreHint'),
onTap: () {
onTap: () {
_settingsViewModel.importKeystore();
final sManageKeystorePassword = SManageKeystorePassword();
sManageKeystorePassword.showKeystoreDialog(context);