Open daijintaozz opened 10 months ago
When I can't open ActionPanel for a long time.
Here is my main code:
ListView.builder( itemCount: myPositions.length, padding: EdgeInsets.zero, itemBuilder: (ctx, index) { return GestureDetector( onLongPress: () { Slidable.of(context)?.openEndActionPane(); }, child: Slidable( groupTag: MyPositionView.routeName, key: ValueKey(index), direction: Axis.horizontal, endActionPane: ActionPane( extentRatio: 0.2, motion: const ScrollMotion(), children: [ Builder(builder: (context) { return Container( margin: EdgeInsets.symmetric(vertical: 6.w), child: Column( children: [ Expanded( child: TextButton( onPressed: () => deletePosition(index, context), style: TextButton.styleFrom( backgroundColor: const Color(0xff4077DE), foregroundColor: Colors.white, ), child: const Icon(Icons.delete_forever), ), ), ], ), ); }), ], ), child: MyWidget(), ), ); }, )
It is very unreasonable to ensure that the context can only be used with Slidable. of (context).
When I can't open ActionPanel for a long time.
Here is my main code:
It is very unreasonable to ensure that the context can only be used with Slidable. of (context).