fix: share selectedindex

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-05 00:45:16 +08:00
parent 1477a9058a
commit cfc66e4364
2 changed files with 8 additions and 0 deletions

View File

@@ -39,9 +39,11 @@ class SharePanel extends StatefulWidget {
super.key,
required this.content,
this.userList,
this.selectedIndex,
});
final Map content;
final int? selectedIndex;
final List<UserModel>? userList;
@override
@@ -68,6 +70,9 @@ class _SharePanelState extends State<SharePanel> {
super.initState();
if (widget.userList?.isNotEmpty == true) {
_userList.addAll(widget.userList!);
if (widget.selectedIndex != null) {
_selectedIndex = widget.selectedIndex!;
}
}
}