mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 16:14:55 +00:00
use assign table as widget
This commit is contained in:
@ -12,6 +12,7 @@ import 'package:syncrow_web/pages/spaces_management/all_spaces/model/tag.dart';
|
|||||||
import 'package:syncrow_web/pages/spaces_management/assign_tag/bloc/assign_tag_bloc.dart';
|
import 'package:syncrow_web/pages/spaces_management/assign_tag/bloc/assign_tag_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/spaces_management/assign_tag/bloc/assign_tag_event.dart';
|
import 'package:syncrow_web/pages/spaces_management/assign_tag/bloc/assign_tag_event.dart';
|
||||||
import 'package:syncrow_web/pages/spaces_management/assign_tag/bloc/assign_tag_state.dart';
|
import 'package:syncrow_web/pages/spaces_management/assign_tag/bloc/assign_tag_state.dart';
|
||||||
|
import 'package:syncrow_web/pages/spaces_management/assign_tag_models/views/widgets/assign_tags_tables_widget.dart';
|
||||||
import 'package:syncrow_web/pages/spaces_management/helper/tag_helper.dart';
|
import 'package:syncrow_web/pages/spaces_management/helper/tag_helper.dart';
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
@ -44,8 +45,10 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final List<String> locations =
|
final List<String> locations = (subspaces ?? [])
|
||||||
(subspaces ?? []).map((subspace) => subspace.subspaceName).toList()..add('Main Space');
|
.map((subspace) => subspace.subspaceName)
|
||||||
|
.toList()
|
||||||
|
..add('Main Space');
|
||||||
|
|
||||||
return BlocProvider(
|
return BlocProvider(
|
||||||
create: (_) => AssignTagBloc(projectTags)
|
create: (_) => AssignTagBloc(projectTags)
|
||||||
@ -67,131 +70,31 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
content: SingleChildScrollView(
|
content: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
ClipRRect(
|
AssignTagsTable(
|
||||||
borderRadius: BorderRadius.circular(20),
|
controllers: controllers,
|
||||||
child: DataTable(
|
locations: locations,
|
||||||
headingRowColor: WidgetStateProperty.all(ColorsManager.dataHeaderGrey),
|
tags: state.tags,
|
||||||
key: ValueKey(state.tags.length),
|
updatedTags: state.updatedTags,
|
||||||
border: TableBorder.all(
|
onDeleteDevice: ({required index, required tag}) {
|
||||||
color: ColorsManager.dataHeaderGrey,
|
context
|
||||||
width: 1,
|
.read<AssignTagBloc>()
|
||||||
borderRadius: BorderRadius.circular(20),
|
.add(DeleteTag(tagToDelete: tag, tags: state.tags));
|
||||||
),
|
|
||||||
columns: [
|
|
||||||
DataColumn(
|
|
||||||
label: Text('#', style: Theme.of(context).textTheme.bodyMedium)),
|
|
||||||
DataColumn(
|
|
||||||
label: Text('Device', style: Theme.of(context).textTheme.bodyMedium)),
|
|
||||||
DataColumn(
|
|
||||||
numeric: false,
|
|
||||||
label: Text('Tag', style: Theme.of(context).textTheme.bodyMedium)),
|
|
||||||
DataColumn(
|
|
||||||
label:
|
|
||||||
Text('Location', style: Theme.of(context).textTheme.bodyMedium)),
|
|
||||||
],
|
|
||||||
rows: state.tags.isEmpty
|
|
||||||
? [
|
|
||||||
DataRow(cells: [
|
|
||||||
DataCell(
|
|
||||||
Center(
|
|
||||||
child: Text('No Data Available',
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
|
||||||
color: ColorsManager.lightGrayColor,
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const DataCell(SizedBox()),
|
|
||||||
const DataCell(SizedBox()),
|
|
||||||
const DataCell(SizedBox()),
|
|
||||||
])
|
|
||||||
]
|
|
||||||
: List.generate(state.tags.length, (index) {
|
|
||||||
final tag = state.tags[index];
|
|
||||||
final controller = controllers[index];
|
|
||||||
|
|
||||||
return DataRow(
|
controllers.removeAt(index);
|
||||||
cells: [
|
},
|
||||||
DataCell(Text((index + 1).toString())),
|
onTagDropDownSelected: ({required index, required tag}) {
|
||||||
DataCell(
|
context.read<AssignTagBloc>().add(UpdateTagEvent(
|
||||||
Row(
|
index: index,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
tag: tag,
|
||||||
children: [
|
));
|
||||||
Expanded(
|
},
|
||||||
child: Text(
|
onLocationDropDownSelected: (
|
||||||
tag.product?.name ?? 'Unknown',
|
{required index, required location}) {
|
||||||
overflow: TextOverflow.ellipsis,
|
context.read<AssignTagBloc>().add(UpdateLocation(
|
||||||
)),
|
index: index,
|
||||||
const SizedBox(width: 10),
|
location: location,
|
||||||
Container(
|
));
|
||||||
width: 20.0,
|
},
|
||||||
height: 20.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
border: Border.all(
|
|
||||||
color: ColorsManager.lightGrayColor,
|
|
||||||
width: 1.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: IconButton(
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: ColorsManager.lightGreyColor,
|
|
||||||
size: 16,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
context.read<AssignTagBloc>().add(
|
|
||||||
DeleteTag(tagToDelete: tag, tags: state.tags));
|
|
||||||
|
|
||||||
controllers.removeAt(index);
|
|
||||||
},
|
|
||||||
tooltip: 'Delete Tag',
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
constraints: const BoxConstraints(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
DataCell(
|
|
||||||
Container(
|
|
||||||
alignment:
|
|
||||||
Alignment.centerLeft, // Align cell content to the left
|
|
||||||
child: SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
child: TagDialogTextfieldDropdown(
|
|
||||||
key: ValueKey('dropdown_${const Uuid().v4()}_$index'),
|
|
||||||
items: state.updatedTags,
|
|
||||||
product: tag.product?.uuid ?? 'Unknown',
|
|
||||||
initialValue: tag,
|
|
||||||
onSelected: (value) {
|
|
||||||
controller.text = value.tag ?? '';
|
|
||||||
context.read<AssignTagBloc>().add(UpdateTagEvent(
|
|
||||||
index: index,
|
|
||||||
tag: value,
|
|
||||||
));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
DataCell(
|
|
||||||
SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
child: DialogDropdown(
|
|
||||||
items: locations,
|
|
||||||
selectedValue: tag.location ?? 'Main Space',
|
|
||||||
onSelected: (value) {
|
|
||||||
context.read<AssignTagBloc>().add(UpdateLocation(
|
|
||||||
index: index,
|
|
||||||
location: value,
|
|
||||||
));
|
|
||||||
},
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
if (state.errorMessage != null)
|
if (state.errorMessage != null)
|
||||||
Text(state.errorMessage!,
|
Text(state.errorMessage!,
|
||||||
@ -213,11 +116,13 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
label: 'Add New Device',
|
label: 'Add New Device',
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final updatedTags = List<Tag>.from(state.tags);
|
final updatedTags = List<Tag>.from(state.tags);
|
||||||
final result = TagHelper.processTags(updatedTags, subspaces);
|
final result =
|
||||||
|
TagHelper.processTags(updatedTags, subspaces);
|
||||||
|
|
||||||
final processedTags = result['updatedTags'] as List<Tag>;
|
final processedTags =
|
||||||
final processedSubspaces =
|
result['updatedTags'] as List<Tag>;
|
||||||
List<SubspaceModel>.from(result['subspaces'] as List<dynamic>);
|
final processedSubspaces = List<SubspaceModel>.from(
|
||||||
|
result['subspaces'] as List<dynamic>);
|
||||||
|
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
|
|
||||||
@ -227,8 +132,8 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
products: products,
|
products: products,
|
||||||
subspaces: processedSubspaces,
|
subspaces: processedSubspaces,
|
||||||
projectTags: projectTags,
|
projectTags: projectTags,
|
||||||
initialSelectedProducts:
|
initialSelectedProducts: TagHelper
|
||||||
TagHelper.createInitialSelectedProductsForTags(
|
.createInitialSelectedProductsForTags(
|
||||||
processedTags, processedSubspaces),
|
processedTags, processedSubspaces),
|
||||||
spaceName: spaceName,
|
spaceName: spaceName,
|
||||||
spaceTags: processedTags,
|
spaceTags: processedTags,
|
||||||
@ -252,11 +157,14 @@ class AssignTagDialog extends StatelessWidget {
|
|||||||
onPressed: state.isSaveEnabled
|
onPressed: state.isSaveEnabled
|
||||||
? () async {
|
? () async {
|
||||||
final updatedTags = List<Tag>.from(state.tags);
|
final updatedTags = List<Tag>.from(state.tags);
|
||||||
final result = TagHelper.processTags(updatedTags, subspaces);
|
final result = TagHelper.processTags(
|
||||||
|
updatedTags, subspaces);
|
||||||
|
|
||||||
final processedTags = result['updatedTags'] as List<Tag>;
|
final processedTags =
|
||||||
|
result['updatedTags'] as List<Tag>;
|
||||||
final processedSubspaces =
|
final processedSubspaces =
|
||||||
List<SubspaceModel>.from(result['subspaces'] as List<dynamic>);
|
List<SubspaceModel>.from(
|
||||||
|
result['subspaces'] as List<dynamic>);
|
||||||
onSave?.call(processedTags, processedSubspaces);
|
onSave?.call(processedTags, processedSubspaces);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,6 +78,35 @@ class AssignTagModelsDialog extends StatelessWidget {
|
|||||||
AssignTagsTable(
|
AssignTagsTable(
|
||||||
controllers: controllers,
|
controllers: controllers,
|
||||||
locations: locations,
|
locations: locations,
|
||||||
|
tags: state.tags,
|
||||||
|
updatedTags: state.updatedTags,
|
||||||
|
onDeleteDevice: ({required index, required tag}) {
|
||||||
|
context
|
||||||
|
.read<AssignTagModelBloc>()
|
||||||
|
.add(DeleteTagModel(
|
||||||
|
tagToDelete: tag,
|
||||||
|
tags: state.tags,
|
||||||
|
));
|
||||||
|
controllers.removeAt(index);
|
||||||
|
},
|
||||||
|
onTagDropDownSelected: (
|
||||||
|
{required index, required tag}) {
|
||||||
|
context.read<AssignTagModelBloc>().add(
|
||||||
|
UpdateTag(
|
||||||
|
index: index,
|
||||||
|
tag: tag,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
onLocationDropDownSelected: (
|
||||||
|
{required index, required location}) {
|
||||||
|
context.read<AssignTagModelBloc>().add(
|
||||||
|
UpdateLocation(
|
||||||
|
index: index,
|
||||||
|
location: location,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
if (state.errorMessage != null)
|
if (state.errorMessage != null)
|
||||||
Text(state.errorMessage!,
|
Text(state.errorMessage!,
|
||||||
|
|||||||
@ -1,172 +1,155 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/tag.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
import '../../../../../common/dialog_dropdown.dart';
|
import '../../../../../common/dialog_dropdown.dart';
|
||||||
import '../../../../../common/tag_dialog_textfield_dropdown.dart';
|
import '../../../../../common/tag_dialog_textfield_dropdown.dart';
|
||||||
import '../../../../../utils/color_manager.dart';
|
import '../../../../../utils/color_manager.dart';
|
||||||
import '../../bloc/assign_tag_model_bloc.dart';
|
|
||||||
import '../../bloc/assign_tag_model_event.dart';
|
|
||||||
import '../../bloc/assign_tag_model_state.dart';
|
|
||||||
|
|
||||||
class AssignTagsTable extends StatelessWidget {
|
class AssignTagsTable extends StatelessWidget {
|
||||||
const AssignTagsTable({
|
const AssignTagsTable({
|
||||||
super.key,
|
super.key,
|
||||||
required this.controllers,
|
required this.controllers,
|
||||||
required this.locations,
|
required this.locations,
|
||||||
|
required this.tags,
|
||||||
|
required this.updatedTags,
|
||||||
|
required this.onDeleteDevice,
|
||||||
|
required this.onLocationDropDownSelected,
|
||||||
|
required this.onTagDropDownSelected,
|
||||||
});
|
});
|
||||||
|
final void Function({required Tag tag, required int index})
|
||||||
|
onTagDropDownSelected;
|
||||||
|
final void Function({required String location, required int index})
|
||||||
|
onLocationDropDownSelected;
|
||||||
|
final void Function({required Tag tag, required int index}) onDeleteDevice;
|
||||||
|
final List<Tag> tags;
|
||||||
|
final List<Tag> updatedTags;
|
||||||
final List<TextEditingController> controllers;
|
final List<TextEditingController> controllers;
|
||||||
final List<String> locations;
|
final List<String> locations;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocBuilder<AssignTagModelBloc, AssignTagModelState>(
|
return ClipRRect(
|
||||||
builder: (context, state) {
|
borderRadius: BorderRadius.circular(20),
|
||||||
if (state is AssignTagModelLoaded) {
|
child: DataTable(
|
||||||
return ClipRRect(
|
headingRowColor: WidgetStateProperty.all(ColorsManager.dataHeaderGrey),
|
||||||
borderRadius: BorderRadius.circular(20),
|
key: ValueKey(tags.length),
|
||||||
child: DataTable(
|
border: TableBorder.all(
|
||||||
headingRowColor:
|
color: ColorsManager.dataHeaderGrey,
|
||||||
WidgetStateProperty.all(ColorsManager.dataHeaderGrey),
|
width: 1,
|
||||||
key: ValueKey(state.tags.length),
|
borderRadius: BorderRadius.circular(20),
|
||||||
border: TableBorder.all(
|
),
|
||||||
color: ColorsManager.dataHeaderGrey,
|
columns: [
|
||||||
width: 1,
|
DataColumn(
|
||||||
borderRadius: BorderRadius.circular(20),
|
label: Text('#', style: Theme.of(context).textTheme.bodyMedium)),
|
||||||
),
|
DataColumn(
|
||||||
columns: [
|
label: Text('Device',
|
||||||
DataColumn(
|
style: Theme.of(context).textTheme.bodyMedium)),
|
||||||
label: Text('#',
|
DataColumn(
|
||||||
style: Theme.of(context).textTheme.bodyMedium)),
|
numeric: false,
|
||||||
DataColumn(
|
label:
|
||||||
label: Text('Device',
|
Text('Tag', style: Theme.of(context).textTheme.bodyMedium)),
|
||||||
style: Theme.of(context).textTheme.bodyMedium)),
|
DataColumn(
|
||||||
DataColumn(
|
label: Text('Location',
|
||||||
numeric: false,
|
style: Theme.of(context).textTheme.bodyMedium)),
|
||||||
label: Text('Tag',
|
],
|
||||||
style: Theme.of(context).textTheme.bodyMedium)),
|
rows: tags.isEmpty
|
||||||
DataColumn(
|
? [
|
||||||
label: Text('Location',
|
DataRow(cells: [
|
||||||
style: Theme.of(context).textTheme.bodyMedium)),
|
DataCell(
|
||||||
],
|
Center(
|
||||||
rows: state.tags.isEmpty
|
child: Text('No Devices Available',
|
||||||
? [
|
style:
|
||||||
DataRow(cells: [
|
Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||||
DataCell(
|
color: ColorsManager.lightGrayColor,
|
||||||
Center(
|
)),
|
||||||
child: Text('No Devices Available',
|
),
|
||||||
style: Theme.of(context)
|
),
|
||||||
.textTheme
|
const DataCell(SizedBox()),
|
||||||
.bodyMedium
|
const DataCell(SizedBox()),
|
||||||
?.copyWith(
|
const DataCell(SizedBox()),
|
||||||
color: ColorsManager.lightGrayColor,
|
])
|
||||||
)),
|
]
|
||||||
),
|
: List.generate(tags.length, (index) {
|
||||||
),
|
final tag = tags[index];
|
||||||
const DataCell(SizedBox()),
|
final controller = controllers[index];
|
||||||
const DataCell(SizedBox()),
|
|
||||||
const DataCell(SizedBox()),
|
|
||||||
])
|
|
||||||
]
|
|
||||||
: List.generate(state.tags.length, (index) {
|
|
||||||
final tag = state.tags[index];
|
|
||||||
final controller = controllers[index];
|
|
||||||
|
|
||||||
return DataRow(
|
return DataRow(
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(Text((index + 1).toString())),
|
DataCell(Text((index + 1).toString())),
|
||||||
DataCell(
|
DataCell(
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
tag.product?.name ?? 'Unknown',
|
tag.product?.name ?? 'Unknown',
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
)),
|
)),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Container(
|
Container(
|
||||||
width: 20.0,
|
width: 20.0,
|
||||||
height: 20.0,
|
height: 20.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: ColorsManager.lightGrayColor,
|
color: ColorsManager.lightGrayColor,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
|
||||||
),
|
|
||||||
child: IconButton(
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: ColorsManager.lightGreyColor,
|
|
||||||
size: 16,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
context.read<AssignTagModelBloc>().add(
|
|
||||||
DeleteTagModel(
|
|
||||||
tagToDelete: tag,
|
|
||||||
tags: state.tags));
|
|
||||||
controllers.removeAt(index);
|
|
||||||
},
|
|
||||||
tooltip: 'Delete Tag',
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
constraints: const BoxConstraints(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
DataCell(
|
|
||||||
Container(
|
|
||||||
alignment: Alignment
|
|
||||||
.centerLeft, // Align cell content to the left
|
|
||||||
child: SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
child: TagDialogTextfieldDropdown(
|
|
||||||
key: ValueKey(
|
|
||||||
'dropdown_${const Uuid().v4()}_$index'),
|
|
||||||
product: tag.product?.uuid ?? 'Unknown',
|
|
||||||
items: state.updatedTags,
|
|
||||||
initialValue: tag,
|
|
||||||
onSelected: (value) {
|
|
||||||
controller.text = value.tag ?? '';
|
|
||||||
context
|
|
||||||
.read<AssignTagModelBloc>()
|
|
||||||
.add(UpdateTag(
|
|
||||||
index: index,
|
|
||||||
tag: value,
|
|
||||||
));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
child: IconButton(
|
||||||
DataCell(
|
icon: const Icon(
|
||||||
SizedBox(
|
Icons.close,
|
||||||
width: double.infinity,
|
color: ColorsManager.lightGreyColor,
|
||||||
child: DialogDropdown(
|
size: 16,
|
||||||
items: locations,
|
),
|
||||||
selectedValue: tag.location ?? 'Main Space',
|
onPressed: () {
|
||||||
onSelected: (value) {
|
onDeleteDevice(tag: tag, index: index);
|
||||||
context
|
},
|
||||||
.read<AssignTagModelBloc>()
|
tooltip: 'Delete Tag',
|
||||||
.add(UpdateLocation(
|
padding: EdgeInsets.zero,
|
||||||
index: index,
|
constraints: const BoxConstraints(),
|
||||||
location: value,
|
),
|
||||||
));
|
|
||||||
},
|
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
}),
|
),
|
||||||
),
|
DataCell(
|
||||||
);
|
Container(
|
||||||
} else {
|
alignment: Alignment
|
||||||
return const SizedBox();
|
.centerLeft, // Align cell content to the left
|
||||||
}
|
child: SizedBox(
|
||||||
},
|
width: double.infinity,
|
||||||
|
child: TagDialogTextfieldDropdown(
|
||||||
|
key: ValueKey(
|
||||||
|
'dropdown_${const Uuid().v4()}_$index'),
|
||||||
|
product: tag.product?.uuid ?? 'Unknown',
|
||||||
|
items: updatedTags,
|
||||||
|
initialValue: tag,
|
||||||
|
onSelected: (value) {
|
||||||
|
controller.text = value.tag ?? '';
|
||||||
|
onTagDropDownSelected(tag: value, index: index);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
DataCell(
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: DialogDropdown(
|
||||||
|
items: locations,
|
||||||
|
selectedValue: tag.location ?? 'Main Space',
|
||||||
|
onSelected: (value) {
|
||||||
|
onLocationDropDownSelected(
|
||||||
|
location: value, index: index);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user