mirror of
https://github.com/simon-ding/polaris.git
synced 2026-05-29 22:18:08 +08:00
fix: show correct path when select storage
This commit is contained in:
@@ -172,6 +172,8 @@ class _SearchPageState extends ConsumerState<SearchPage> {
|
||||
),
|
||||
storage.when(
|
||||
data: (v) {
|
||||
return StatefulBuilder(
|
||||
builder: (context, setState) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -192,19 +194,32 @@ class _SearchPageState extends ConsumerState<SearchPage> {
|
||||
item.mediaType == "tv"
|
||||
? name.when(
|
||||
data: (s) {
|
||||
final path = v[storageSelected]
|
||||
return storageSelected == 0
|
||||
? const Text("")
|
||||
: () {
|
||||
final storage = v
|
||||
.where((e) =>
|
||||
e.id ==
|
||||
storageSelected)
|
||||
.first;
|
||||
final path = storage
|
||||
.settings!["tv_path"];
|
||||
|
||||
pathController.text = s;
|
||||
return SizedBox(
|
||||
//width: 300,
|
||||
child: TextField(
|
||||
controller: pathController,
|
||||
decoration: InputDecoration(
|
||||
labelText: "存储路径",
|
||||
prefix: Text(path)),
|
||||
controller:
|
||||
pathController,
|
||||
decoration:
|
||||
InputDecoration(
|
||||
labelText:
|
||||
"存储路径",
|
||||
prefix:
|
||||
Text(path)),
|
||||
),
|
||||
);
|
||||
}();
|
||||
},
|
||||
error: (error, stackTrace) =>
|
||||
Text("$error"),
|
||||
@@ -216,6 +231,7 @@ class _SearchPageState extends ConsumerState<SearchPage> {
|
||||
: Text(""),
|
||||
],
|
||||
);
|
||||
});
|
||||
},
|
||||
error: (err, trace) => Text("$err"),
|
||||
loading: () => const MyProgressIndicator()),
|
||||
|
||||
Reference in New Issue
Block a user