mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
fixed size of icon
This commit is contained in:
@ -5,6 +5,7 @@ import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/model/product_model.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/model/selected_product_model.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/widgets/add_device_type_widget.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/widgets/dialogs/icon_selection_dialog.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/widgets/hoverable_button.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
@ -261,45 +262,16 @@ class CreateSpaceDialogState extends State<CreateSpaceDialog> {
|
||||
}
|
||||
|
||||
void _showIconSelectionDialog() {
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Select Icon'),
|
||||
backgroundColor: Colors.white,
|
||||
content: Container(
|
||||
width: screenWidth * 0.5,
|
||||
padding: const EdgeInsets.all(18),
|
||||
decoration: BoxDecoration(
|
||||
color: ColorsManager.boxColor,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: GridView.builder(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 7,
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisSpacing: 22,
|
||||
),
|
||||
itemCount: spaceIconList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
selectedIcon = spaceIconList[index];
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
spaceIconList[index],
|
||||
width: screenWidth * 0.06,
|
||||
height: screenWidth * 0.06,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
return IconSelectionDialog(
|
||||
spaceIconList: spaceIconList,
|
||||
onIconSelected: (String selectedIcon) {
|
||||
setState(() {
|
||||
this.selectedIcon = selectedIcon;
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
@ -316,7 +288,7 @@ class CreateSpaceDialogState extends State<CreateSpaceDialog> {
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: ColorsManager.neutralGray,
|
||||
width: 2, // Set the border width
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
child: Wrap(
|
||||
|
Reference in New Issue
Block a user