just_bottom_sheet 1.0.1 copy "just_bottom_sheet: ^1.0.1" to clipboard
just_bottom_sheet: ^1.0.1 copied to clipboard

outdated

Just Bottom Sheet. Bottom sheet with properly working nested scroll and swipe to close gesture.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:just_bottom_sheet/just_bottom_sheet.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'JustBottomSheet Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        backgroundColor: Colors.white,
      ),
      darkTheme: ThemeData(
        brightness: Brightness.dark,
      ),
      home: const MyHomePage(title: 'JustBottomSheet Example'),
    );
  }
}

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

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  final scrollController = ScrollController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          showJustBottomSheet(
            context: context,
            closeOnScroll: true,
            cornerRadius: 32,
            scrollController: scrollController,
            builder: (context) {
              return ListView.builder(
                controller: scrollController,
                itemBuilder: (context, row) {
                  return Material(
                    color: Colors.transparent,
                    child: ListTile(
                      title: Text("Row #$row"),
                    ),
                  );
                },
                itemCount: 99,
              );
            },
          );
        },
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
13
likes
0
points
61
downloads

Publisher

unverified uploader

Weekly Downloads

Just Bottom Sheet. Bottom sheet with properly working nested scroll and swipe to close gesture.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on just_bottom_sheet