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

Enhanced DraggableScrollableSheet constrained to a tucking widget

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Tucking Draggable Scrollable Sheet'),
        ),
        body: SafeArea(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: [
              Padding(
                padding: const EdgeInsets.symmetric(horizontal: 16.0),
                child: Text(
                  'Headline',
                  style: Theme.of(context).textTheme.headlineLarge,
                ),
              ),
              Expanded(
                child: TuckingDraggableScrollableSheet(
                  snap: true,
                  tucking: Padding(
                    padding: const EdgeInsets.symmetric(horizontal: 16.0),
                    child: Column(
                      mainAxisSize: MainAxisSize.min,
                      crossAxisAlignment: CrossAxisAlignment.stretch,
                      children: [
                        const SizedBox(height: 16),
                        Text(
                          'Tucking Subtitle',
                          style: Theme.of(context).textTheme.headlineSmall,
                        ),
                      ],
                    ),
                  ),
                  sheetBuilder: (context, scrollController) => Card(
                    elevation: 20,
                    child: ListView.builder(
                      controller: scrollController,
                      itemBuilder: (context, index) => ListTile(
                        title: Text('Item $index'),
                      ),
                      itemCount: 100,
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
6
likes
160
points
171
downloads

Publisher

unverified uploader

Weekly Downloads

Enhanced DraggableScrollableSheet constrained to a tucking widget

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_tucking_draggable_scrollable_sheet