bottom_sheet_scaffold 0.0.5 bottom_sheet_scaffold: ^0.0.5 copied to clipboard
Slide your bottom sheet by sliding the body of the scaffold!. Very simple and customizable bottom sheet to implement.
import 'package:flutter/material.dart';
// ignore: depend_on_referenced_packages
import 'package:bottom_sheet_scaffold/bottom_sheet_scaffold.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return BottomSheetScaffold(
bottomSheet: DraggableBottomSheet(
maxHeight: 600,
body: const Center(
child: Text(
"Bottom Sheet Scaffold",
style: TextStyle(fontSize: 36, color: Colors.black),
)),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
const SizedBox(
height: 100,
),
const Text(
'Body of Scaffold',
),
],
),
),
);
}
}