mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 14:47:23 +00:00
Refactor CreateSubSpaceDialog
to improve widget structure and readability
This commit is contained in:
@ -37,20 +37,20 @@ class CreateSubSpaceDialog extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final textController = TextEditingController();
|
||||
|
||||
return Dialog(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: BlocProvider(
|
||||
create: (_) {
|
||||
final bloc = SubSpaceBloc();
|
||||
if (existingSubSpaces != null) {
|
||||
for (final subSpace in existingSubSpaces ?? []) {
|
||||
bloc.add(AddSubSpace(subSpace));
|
||||
}
|
||||
return BlocProvider(
|
||||
create: (_) {
|
||||
final bloc = SubSpaceBloc();
|
||||
if (existingSubSpaces != null) {
|
||||
for (final subSpace in existingSubSpaces ?? []) {
|
||||
bloc.add(AddSubSpace(subSpace));
|
||||
}
|
||||
return bloc;
|
||||
},
|
||||
}
|
||||
return bloc;
|
||||
},
|
||||
child: Dialog(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: BlocBuilder<SubSpaceBloc, SubSpaceState>(
|
||||
builder: (context, state) {
|
||||
return Container(
|
||||
|
Reference in New Issue
Block a user