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(
|
return BlocProvider(
|
||||||
create: (_) =>
|
create: (_) =>
|
||||||
WorkspaceMemberBloc(userProfile: userProfile, workspace: workspace)
|
WorkspaceMemberBloc(userProfile: userProfile, workspace: workspace)
|
||||||
..add(const WorkspaceMemberEvent.initial())
|
..add(const WorkspaceMemberEvent.initial()),
|
||||||
..add(const WorkspaceMemberEvent.getWorkspaceMembers()),
|
|
||||||
child: BlocBuilder<WorkspaceMemberBloc, WorkspaceMemberState>(
|
child: BlocBuilder<WorkspaceMemberBloc, WorkspaceMemberState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final members = state.members;
|
final members = state.members;
|
||||||
|
@ -38,6 +38,8 @@ class WorkspaceMemberBloc
|
|||||||
workspaceId = '';
|
workspaceId = '';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add(const WorkspaceMemberEvent.getWorkspaceMembers());
|
||||||
},
|
},
|
||||||
getWorkspaceMembers: () async {
|
getWorkspaceMembers: () async {
|
||||||
final members = await _getWorkspaceMembers();
|
final members = await _getWorkspaceMembers();
|
||||||
|
@ -27,9 +27,7 @@ class WorkspaceMembersPage extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocProvider<WorkspaceMemberBloc>(
|
return BlocProvider<WorkspaceMemberBloc>(
|
||||||
create: (context) => WorkspaceMemberBloc(userProfile: userProfile)
|
create: (context) => WorkspaceMemberBloc(userProfile: userProfile)
|
||||||
..add(
|
..add(const WorkspaceMemberEvent.initial()),
|
||||||
const WorkspaceMemberEvent.getWorkspaceMembers(),
|
|
||||||
),
|
|
||||||
child: BlocBuilder<WorkspaceMemberBloc, WorkspaceMemberState>(
|
child: BlocBuilder<WorkspaceMemberBloc, WorkspaceMemberState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
|
Loading…
Reference in New Issue
Block a user