Skip to content

Commit

Permalink
style dimissible
Browse files Browse the repository at this point in the history
  • Loading branch information
LezdCS committed Oct 10, 2024
1 parent 2750d92 commit afb5dcb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
28 changes: 24 additions & 4 deletions lib/src/presentation/widgets/settings/chats_joined.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,18 @@ class ChatsJoined extends GetView<SettingsViewController> {
key: ValueKey(group),
direction: DismissDirection.endToStart,
background: Container(
color: Colors.red,
child: const Icon(Icons.delete),
alignment: Alignment.centerRight,
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 10,
children: [
Text('delete'.tr),
const Icon(
Icons.delete,
color: Colors.red,
),
],
),
),
onDismissed: (direction) {
// If the user swipes to the left
Expand Down Expand Up @@ -206,8 +216,18 @@ class ChatsJoined extends GetView<SettingsViewController> {
return Dismissible(
direction: DismissDirection.endToStart,
background: Container(
color: Colors.red,
child: const Icon(Icons.delete),
alignment: Alignment.centerRight,
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 10,
children: [
Text('delete'.tr),
const Icon(
Icons.delete,
color: Colors.red,
),
],
),
),
confirmDismiss: (direction) => Future.value(true),
onDismissed: (direction) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,17 @@ class DashboardSettingsView extends GetView<DashboardController> {
direction: DismissDirection.endToStart,
background: Container(
alignment: Alignment.centerRight,
child: const Icon(Icons.delete, color: Colors.red,),
child: Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 10,
children: [
Text('delete'.tr),
const Icon(
Icons.delete,
color: Colors.red,
),
],
),
),
confirmDismiss: (direction) => Future.value(true),
onDismissed: (context) {
Expand Down

0 comments on commit afb5dcb

Please sign in to comment.