I have SingleChildScrollView
with short ListView
inside Scaffold
. As You see on video, SingleChildScrollView
do not fill whole body of Scaffold
. How to fix it?
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(
),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: MyWidget(),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child:
// return
ListView(shrinkWrap: true, children: [
const ListTile(
title: Text("TEST"),
subtitle: Text("________"),
),
const ListTile(
title: Text("TEST"),
subtitle: Text("________"),
),
const ListTile(
title: Text("TEST"),
subtitle: Text("________"),
),
const ListTile(
title: Text("TEST"),
subtitle: Text("________"),
),
const ListTile(
title: Text("TEST"),
subtitle: Text("________"),
),
const ListTile(
title: Text("TEST"),
subtitle: Text("________"),
),
const ListTile(
title: Text("TEST"),
subtitle: Text("________"),
)
]));
}
}