mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: uninitialized error in members setting page (#4834)
This commit is contained in:
parent
f5cb8b6d25
commit
f484675008
@ -113,8 +113,7 @@ class WorkspaceMenuItem extends StatelessWidget {
|
||||
return BlocProvider(
|
||||
create: (_) =>
|
||||
WorkspaceMemberBloc(userProfile: userProfile, workspace: workspace)
|
||||
..add(const WorkspaceMemberEvent.initial())
|
||||
..add(const WorkspaceMemberEvent.getWorkspaceMembers()),
|
||||
..add(const WorkspaceMemberEvent.initial()),
|
||||
child: BlocBuilder<WorkspaceMemberBloc, WorkspaceMemberState>(
|
||||
builder: (context, state) {
|
||||
final members = state.members;
|
||||
|
@ -38,6 +38,8 @@ class WorkspaceMemberBloc
|
||||
workspaceId = '';
|
||||
});
|
||||
}
|
||||
|
||||
add(const WorkspaceMemberEvent.getWorkspaceMembers());
|
||||
},
|
||||
getWorkspaceMembers: () async {
|
||||
final members = await _getWorkspaceMembers();
|
||||
|
@ -27,9 +27,7 @@ class WorkspaceMembersPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider<WorkspaceMemberBloc>(
|
||||
create: (context) => WorkspaceMemberBloc(userProfile: userProfile)
|
||||
..add(
|
||||
const WorkspaceMemberEvent.getWorkspaceMembers(),
|
||||
),
|
||||
..add(const WorkspaceMemberEvent.initial()),
|
||||
child: BlocBuilder<WorkspaceMemberBloc, WorkspaceMemberState>(
|
||||
builder: (context, state) {
|
||||
return SingleChildScrollView(
|
||||
|
Loading…
Reference in New Issue
Block a user