letsar / flutter_slidable

A Flutter implementation of slidable list item with directional slide actions.
MIT License
2.66k stars 562 forks source link

it's allowed to make it just to swipe right without left : new panes #265

Open mustafa-707 opened 2 years ago

mustafa-707 commented 2 years ago

Hello , i just would to ask if i can stop the startActionPane and allow the 'endActionPane' i tried to make ratio of expanding 0 but it not allowed to be 0 , i returned to version 0.6.0 that was allowed to make one direction slide

many thanks

letsar commented 2 years ago

You just have to not set startActionPane :-)

mustafa-707 commented 2 years ago

but when i not set startActionPane or endActionPane it not slide at all

tazik561 commented 2 years ago

but when i not set startActionPane or endActionPane it not slide at all

When I don't set startActionPane , endActionPane not shows anything? I am using flutter_slidable 1.1.0

return Slidable(
        // Specify a key if the Slidable is dismissible.
        key: const ValueKey(0),
        // The end action pane is the one at the right or the bottom side.
        endActionPane: ActionPane(
          motion: ScrollMotion(),
          children: [
            SlidableAction(
              // An action can be bigger than the others.
              flex: 2,
              onPressed: (_) {},
              backgroundColor: Color(0xFF7BC043),
              foregroundColor: Colors.white,
              icon: Icons.archive,
              label: 'Archive',
            ),
            SlidableAction(
              onPressed: (_) {},
              backgroundColor: Color(0xFF0392CF),
              foregroundColor: Colors.white,
              icon: Icons.save,
              label: 'Save',
            ),
          ],
        ),

        // The child of the Slidable is what the user sees when the
        // component is not dragged.
        child: const ListTile(
            title: Text(
          'Slide me',
          style: TextStyle(fontSize: 25, color: Colors.red),
        )),
      );

ezgif com-gif-maker (1)

letsar commented 2 years ago

It seems to be fixed in the latest version. Can you retry?