spring_bottom_sheet 0.0.3 copy "spring_bottom_sheet: ^0.0.3" to clipboard
spring_bottom_sheet: ^0.0.3 copied to clipboard

A lightweight Flutter package that provides a beautiful spring-animated bottom sheet with automatic height adjustment and smooth animations.

example/lib/main.dart

// ignore_for_file: depend_on_referenced_packages

import 'package:flutter/material.dart';
import 'package:spring_bottom_sheet/spring_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(
      debugShowCheckedModeBanner: false,
      title: 'Spring BottomSheet Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      body: Center(
        child: ElevatedButton(
          child: const Text('Show Spring BottomSheet'),
          onPressed: () {
            showModalBottomSheet(
              context: context,
              builder: (context) => SpringBottomSheet(
                child: Container(
                  color: Colors.white,
                  height: 150,
                  child: const Center(
                    child: Text(
                      'This is your child!',
                      style: TextStyle(fontSize: 24),
                    ),
                  ),
                ),
              ),
              isScrollControlled: true,
            );
          },
        ),
      ),
    );
  }
}
7
likes
160
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight Flutter package that provides a beautiful spring-animated bottom sheet with automatic height adjustment and smooth animations.

Repository (GitHub)
View/report issues

Topics

#animation #ui #bottom-sheet #modal #spring

Documentation

API reference

Funding

Consider supporting this project:

www.paypal.me

License

MIT (license)

Dependencies

flutter

More

Packages that depend on spring_bottom_sheet