Enhanced sizing of SpaceDetailsForm and SpaceIconPicker.

This commit is contained in:
Faris Armoush
2025-07-24 12:00:53 +03:00
parent 6dbb6b6a6e
commit 16b79ae12f
2 changed files with 18 additions and 17 deletions

View File

@ -30,18 +30,25 @@ class SpaceDetailsForm extends StatelessWidget {
buildWhen: (previous, current) => previous != current,
builder: (context, space) {
return AlertDialog(
title: title,
title: DefaultTextStyle(
style: context.textTheme.titleLarge!.copyWith(
fontSize: 30,
fontWeight: FontWeight.w400,
color: ColorsManager.blackColor,
),
child: title,
),
backgroundColor: ColorsManager.white,
content: SizedBox(
height: context.screenHeight * 0.3,
width: context.screenWidth * 0.5,
width: context.screenWidth * 0.4,
child: Row(
spacing: 20,
spacing: 12,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: SpaceIconPicker(iconPath: space.icon)),
Expanded(
flex: 2,
flex: 3,
child: ListView(
shrinkWrap: true,
children: [

View File

@ -17,14 +17,14 @@ class SpaceIconPicker extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
return Align(
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: [
Container(
width: context.screenWidth * 0.175,
height: context.screenHeight * 0.175,
width: context.screenWidth * 0.13,
height: context.screenHeight * 0.13,
decoration: const BoxDecoration(
color: ColorsManager.boxColor,
shape: BoxShape.circle,
@ -38,7 +38,7 @@ class SpaceIconPicker extends StatelessWidget {
),
Positioned.directional(
top: 12,
start: context.screenHeight * 0.06,
start: context.screenHeight * 0.0375,
textDirection: Directionality.of(context),
child: InkWell(
onTap: () {
@ -58,14 +58,8 @@ class SpaceIconPicker extends StatelessWidget {
});
},
child: Container(
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: SvgPicture.asset(
Assets.iconEdit,
width: 16,
height: 16,
),
decoration: const BoxDecoration(shape: BoxShape.circle),
child: SvgPicture.asset(Assets.iconEdit, width: 16, height: 16),
),
),
),