flutter_slidable_panel 1.1.4 copy "flutter_slidable_panel: ^1.1.4" to clipboard
flutter_slidable_panel: ^1.1.4 copied to clipboard

A high-performant slidable Panel that can show actions in different positions, and also can expand the action item when the panel is opening

example/lib/main.dart

import 'package:example/list_slidable.dart';
import 'package:example/sized_slidable.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            OutlinedButton(
              onPressed: () {
                context.push(
                  const SizedSlidableExample(),
                );
              },
              child: const Text("Sized Slidable Example"),
            ),
            OutlinedButton(
              onPressed: () {
                context.push(
                  const SlidableListExample(),
                );
              },
              child: const Text("Slidable List Example"),
            )
          ],
        ),
      ),
    );
  }
}

extension NavigationExt on BuildContext {
  void push(Widget page) {
    Navigator.of(this).push(MaterialPageRoute(builder: (_) => page));
  }
}
11
likes
140
points
264
downloads

Publisher

verified publishersimonwang.dev

Weekly Downloads

A high-performant slidable Panel that can show actions in different positions, and also can expand the action item when the panel is opening

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_slidable_panel