mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 13:05:37 +02:00
refactor: apply suggestions from analyser
Signed-off-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
parent
c56c445fb7
commit
a0b673c138
18 changed files with 120 additions and 79 deletions
|
@ -400,7 +400,9 @@ class _TextFieldForPatchOptionState extends State<TextFieldForPatchOption> {
|
|||
final bool isStringOption = widget.optionType.contains('String');
|
||||
final bool isArrayOption = widget.optionType.contains('Array');
|
||||
selectedKey ??= widget.selectedKey;
|
||||
controller.text = !isStringOption && isArrayOption && selectedKey == '' &&
|
||||
controller.text = !isStringOption &&
|
||||
isArrayOption &&
|
||||
selectedKey == '' &&
|
||||
(widget.value != null && widget.value.toString().startsWith('['))
|
||||
? ''
|
||||
: widget.value ?? '';
|
||||
|
@ -519,7 +521,8 @@ class _TextFieldForPatchOptionState extends State<TextFieldForPatchOption> {
|
|||
}
|
||||
break;
|
||||
case 'patchOptionsView.selectFolder':
|
||||
final DirectoryLocation? result = await FlutterFileDialog.pickDirectory();
|
||||
final DirectoryLocation? result =
|
||||
await FlutterFileDialog.pickDirectory();
|
||||
if (result != null) {
|
||||
controller.text = result.toString();
|
||||
widget.onChanged(controller.text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue