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,
|
||||
selectedCommunity: previousState.selectedCommunity,
|
||||
));
|
||||
|
||||
}
|
||||
add(LoadCommunityAndSpacesEvent());
|
||||
} else {
|
||||
emit(const SpaceManagementError('Failed to update the community.'));
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
Flexible(
|
||||
child: Text(
|
||||
communityName!,
|
||||
style: const TextStyle(fontSize: 16, color: ColorsManager.blackColor),
|
||||
style: theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
@ -89,7 +89,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
),
|
||||
style: const TextStyle(fontSize: 16, color: ColorsManager.blackColor),
|
||||
style: theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||
onSubmitted: onNameSubmitted,
|
||||
),
|
||||
),
|
||||
@ -103,52 +103,14 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const Spacer(flex: 3), // Pushes the Save button to the right
|
||||
if (isSave) _buildActionButtons(),
|
||||
if (isSave) _buildActionButtons(theme),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildCommunityName(double screenWidth) {
|
||||
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() {
|
||||
Widget _buildActionButtons(ThemeData theme) {
|
||||
return Wrap(
|
||||
alignment: WrapAlignment.end,
|
||||
spacing: 10,
|
||||
@ -157,6 +119,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
label: "Save",
|
||||
icon: const Icon(Icons.save, size: 18, color: ColorsManager.spaceColor),
|
||||
onPressed: onSave,
|
||||
theme: theme
|
||||
),
|
||||
],
|
||||
);
|
||||
@ -166,8 +129,9 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
required String label,
|
||||
required Widget icon,
|
||||
required VoidCallback onPressed,
|
||||
required ThemeData theme
|
||||
}) {
|
||||
final double buttonHeight = 30;
|
||||
const double buttonHeight = 30;
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 80, minHeight: buttonHeight),
|
||||
child: DefaultButton(
|
||||
@ -187,7 +151,7 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
style: const TextStyle(fontSize: 13),
|
||||
style: theme.textTheme.bodySmall?.copyWith(color: ColorsManager.blackColor),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
@ -197,6 +161,4 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user