fixed style

This commit is contained in:
hannathkadher
2024-11-23 18:34:52 +04:00
parent 12bf0f0b57
commit 729bd41bec
2 changed files with 20 additions and 45 deletions

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:syncrow_web/pages/common/buttons/cancel_button.dart';
import 'package:syncrow_web/utils/color_manager.dart';
void showDeleteConfirmationDialog(BuildContext context, VoidCallback onConfirm, bool isSpace) {
@ -74,22 +75,9 @@ void showDeleteConfirmationDialog(BuildContext context, VoidCallback onConfirm,
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
onPressed: () {
Navigator.of(context).pop(); // Close the first dialog
// Trigger the second popup
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: const BorderSide(color: ColorsManager.boxColor), // Black border
),
),
child: const Text(
'Cancel',
style: TextStyle(color: Colors.black),
),
CancelButton(
label: 'Cancel',
onPressed: () => Navigator.of(context).pop(),
),
ElevatedButton(
onPressed: () {
@ -97,11 +85,11 @@ void showDeleteConfirmationDialog(BuildContext context, VoidCallback onConfirm,
showProcessingPopup(context, isSpace, onConfirm);
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.blue,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
),
backgroundColor: Colors.blue,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
fixedSize: Size(140, 40)),
child: const Text(
'Continue',
style: TextStyle(color: Colors.white),
@ -184,13 +172,13 @@ void showProcessingPopup(BuildContext context, bool isSpace, VoidCallback onDele
ElevatedButton(
onPressed: () {
// Trigger the second popup
onDelete();
onDelete();
},
style: ElevatedButton.styleFrom(
backgroundColor: ColorsManager.warningRed,
fixedSize: Size(140, 40),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: const BorderSide(color: ColorsManager.boxColor), // Black border
),
),
child: const Text(
@ -198,20 +186,9 @@ void showProcessingPopup(BuildContext context, bool isSpace, VoidCallback onDele
style: TextStyle(color: Colors.white),
),
),
ElevatedButton(
onPressed: () {
Navigator.of(context).pop(); // Close the first dialog
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
),
child: const Text(
'Cancel',
style: TextStyle(color: Colors.black),
),
CancelButton(
label: 'Cancel',
onPressed: () => Navigator.of(context).pop(),
),
],
),

View File

@ -50,7 +50,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
super.didUpdateWidget(oldWidget);
if (widget.selectedSpaceUuid != oldWidget.selectedSpaceUuid) {
setState(() {
_selectedId = widget.selectedSpaceUuid;
_selectedId = widget.selectedSpaceUuid;
});
}
}
@ -86,8 +86,6 @@ class _SidebarWidgetState extends State<SidebarWidget> {
final containsQueryInSpaces =
community.spaces.any((space) => _containsQuery(space, _searchQuery.toLowerCase()));
return containsQueryInCommunity || containsQueryInSpaces;
}).toList();
}
@ -140,10 +138,10 @@ class _SidebarWidgetState extends State<SidebarWidget> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Communities',
style: Theme.of(context).textTheme.titleMedium,
),
Text('Communities',
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: Colors.black,
)),
GestureDetector(
onTap: () => _showCreateCommunityDialog(context),
child: Container(
@ -238,7 +236,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
}
if (widget.onSelectedSpaceChanged != null) {
widget.onSelectedSpaceChanged!(space.uuid);
widget.onSelectedSpaceChanged!(space.uuid);
}
},
children: space.children.isNotEmpty