mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
updated text theme
This commit is contained in:
@ -45,8 +45,8 @@ class SpaceManagementBloc extends Bloc<SpaceManagementEvent, SpaceManagementStat
|
|||||||
products: previousState.products,
|
products: previousState.products,
|
||||||
selectedCommunity: previousState.selectedCommunity,
|
selectedCommunity: previousState.selectedCommunity,
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
add(LoadCommunityAndSpacesEvent());
|
|
||||||
} else {
|
} else {
|
||||||
emit(const SpaceManagementError('Failed to update the community.'));
|
emit(const SpaceManagementError('Failed to update the community.'));
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
|||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
communityName!,
|
communityName!,
|
||||||
style: const TextStyle(fontSize: 16, color: ColorsManager.blackColor),
|
style: theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
@ -89,7 +89,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
isDense: true,
|
isDense: true,
|
||||||
),
|
),
|
||||||
style: const TextStyle(fontSize: 16, color: ColorsManager.blackColor),
|
style: theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||||
onSubmitted: onNameSubmitted,
|
onSubmitted: onNameSubmitted,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -103,52 +103,14 @@ class CommunityStructureHeader extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(flex: 3), // Pushes the Save button to the right
|
const Spacer(flex: 3), // Pushes the Save button to the right
|
||||||
if (isSave) _buildActionButtons(),
|
if (isSave) _buildActionButtons(theme),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCommunityName(double screenWidth) {
|
Widget _buildActionButtons(ThemeData theme) {
|
||||||
return Row(
|
|
||||||
children: [
|
|
||||||
if (!isEditingName)
|
|
||||||
Flexible(
|
|
||||||
child: Text(
|
|
||||||
communityName!,
|
|
||||||
style: const TextStyle(fontSize: 16, color: ColorsManager.blackColor),
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
maxLines: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (isEditingName)
|
|
||||||
SizedBox(
|
|
||||||
width: screenWidth * 0.3,
|
|
||||||
child: TextField(
|
|
||||||
controller: nameController,
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
border: InputBorder.none,
|
|
||||||
isDense: true,
|
|
||||||
),
|
|
||||||
style: const TextStyle(fontSize: 16, color: ColorsManager.blackColor),
|
|
||||||
onSubmitted: onNameSubmitted,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: onEditName,
|
|
||||||
child: SvgPicture.asset(
|
|
||||||
Assets.iconEdit,
|
|
||||||
width: 16,
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _buildActionButtons() {
|
|
||||||
return Wrap(
|
return Wrap(
|
||||||
alignment: WrapAlignment.end,
|
alignment: WrapAlignment.end,
|
||||||
spacing: 10,
|
spacing: 10,
|
||||||
@ -157,6 +119,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
|||||||
label: "Save",
|
label: "Save",
|
||||||
icon: const Icon(Icons.save, size: 18, color: ColorsManager.spaceColor),
|
icon: const Icon(Icons.save, size: 18, color: ColorsManager.spaceColor),
|
||||||
onPressed: onSave,
|
onPressed: onSave,
|
||||||
|
theme: theme
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -166,8 +129,9 @@ class CommunityStructureHeader extends StatelessWidget {
|
|||||||
required String label,
|
required String label,
|
||||||
required Widget icon,
|
required Widget icon,
|
||||||
required VoidCallback onPressed,
|
required VoidCallback onPressed,
|
||||||
|
required ThemeData theme
|
||||||
}) {
|
}) {
|
||||||
final double buttonHeight = 30;
|
const double buttonHeight = 30;
|
||||||
return ConstrainedBox(
|
return ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxWidth: 80, minHeight: buttonHeight),
|
constraints: BoxConstraints(maxWidth: 80, minHeight: buttonHeight),
|
||||||
child: DefaultButton(
|
child: DefaultButton(
|
||||||
@ -187,7 +151,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
|||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
label,
|
label,
|
||||||
style: const TextStyle(fontSize: 13),
|
style: theme.textTheme.bodySmall?.copyWith(color: ColorsManager.blackColor),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
@ -197,6 +161,4 @@ class CommunityStructureHeader extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user