spring_bottom_sheet 0.0.1
spring_bottom_sheet: ^0.0.1 copied to clipboard
A Flutter package that adds a customizable spring animation to modal BottomSheet widgets.
example/lib/main.dart
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(
title: 'Spring BottomSheet Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
title: const Text('Spring BottomSheet Demo'),
),
body: Center(
child: ElevatedButton(
child: const Text('Show Spring BottomSheet'),
onPressed: () {
showSpringBottomSheet(context);
},
),
),
);
}
}