mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
moved styling of _buildChip
up, and removed unnecessary SizedBox
.
This commit is contained in:
@ -10,6 +10,7 @@ import 'package:syncrow_web/pages/spaces_management/space_model/models/subspace_
|
||||
import 'package:syncrow_web/pages/spaces_management/space_model/widgets/button_content_widget.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/tag_model/views/add_device_type_model_widget.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||
|
||||
class TagChipDisplay extends StatelessWidget {
|
||||
@ -112,20 +113,6 @@ class TagChipDisplay extends StatelessWidget {
|
||||
MapEntry<ProductModel, int> entry,
|
||||
) {
|
||||
return Chip(
|
||||
avatar: SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: SvgPicture.asset(
|
||||
entry.key.icon ?? 'assets/icons/gateway.svg',
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
label: Text(
|
||||
'${entry.value}',
|
||||
style: context.textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.spaceColor,
|
||||
),
|
||||
),
|
||||
backgroundColor: ColorsManager.whiteColors,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
@ -133,6 +120,18 @@ class TagChipDisplay extends StatelessWidget {
|
||||
color: ColorsManager.spaceColor,
|
||||
),
|
||||
),
|
||||
avatar: SvgPicture.asset(
|
||||
entry.key.icon ?? Assets.gateway,
|
||||
fit: BoxFit.contain,
|
||||
height: 24,
|
||||
width: 24,
|
||||
),
|
||||
label: Text(
|
||||
'${entry.value}',
|
||||
style: context.textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.spaceColor,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user