mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
fixed save button position
This commit is contained in:
@ -70,12 +70,16 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
),
|
||||
if (communityName != null)
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
if (!isEditingName)
|
||||
Flexible(
|
||||
child: Text(
|
||||
communityName!,
|
||||
style: theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||
style:
|
||||
theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
@ -89,11 +93,12 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
),
|
||||
style: theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||
style:
|
||||
theme.textTheme.bodyLarge?.copyWith(color: ColorsManager.blackColor),
|
||||
onSubmitted: onNameSubmitted,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: 2),
|
||||
GestureDetector(
|
||||
onTap: onEditName,
|
||||
child: SvgPicture.asset(
|
||||
@ -102,8 +107,13 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
const Spacer(flex: 3), // Pushes the Save button to the right
|
||||
if (isSave) _buildActionButtons(theme),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (isSave) ...[
|
||||
const SizedBox(width: 8),
|
||||
_buildActionButtons(theme),
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -119,18 +129,16 @@ class CommunityStructureHeader extends StatelessWidget {
|
||||
label: "Save",
|
||||
icon: const Icon(Icons.save, size: 18, color: ColorsManager.spaceColor),
|
||||
onPressed: onSave,
|
||||
theme: theme
|
||||
),
|
||||
theme: theme),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildButton({
|
||||
required String label,
|
||||
Widget _buildButton(
|
||||
{required String label,
|
||||
required Widget icon,
|
||||
required VoidCallback onPressed,
|
||||
required ThemeData theme
|
||||
}) {
|
||||
required ThemeData theme}) {
|
||||
const double buttonHeight = 30;
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: 80, minHeight: buttonHeight),
|
||||
|
Reference in New Issue
Block a user