Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import 'package:flutter/material.dart';
class DragabbleScrollableSheetDemo extends StatefulWidget {
_DragabbleScrollableSheetDemoState createState() =>
class _DragabbleScrollableSheetDemoState
extends State<DragabbleScrollableSheetDemo> {
void initState() {
// TODO: implement initState
Widget build(BuildContext context) {
return MaterialApp(
darkTheme: ThemeData.dark(),
theme: ThemeData(brightness: Brightness.dark),
home: Scaffold(
appBar: AppBar(
title: const Text('DraggableScrollableSheet'),
body: Container(
child: DraggableScrollableSheet(
initialChildSize: 0.3,
minChildSize: 0.1,
maxChildSize: 0.8,
builder: (BuildContext context, myscrollController) {
return Container(
color: Colors.tealAccent[200],
child: ListView.builder(
controller: myscrollController,
itemCount: 25,
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text(
'Dish $index',
style: TextStyle(color: Colors.black54),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.