Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter - The screen is not scrolling

Tags:

flutter

dart

I inserted 6 cards, however it is not possible to scroll the screen.

According to the image below, a red stripe appears in the footer, and the screen does not scroll.

What is missing to be able to scroll the screen?

main.dart

import 'package:flutter/material.dart';  void main() {   runApp(new MyApp()); }  class MyApp extends StatelessWidget {   @override   Widget build(BuildContext context) {     return new MaterialApp(       title: "Myapp",       home: new HomePage(),     );   } }  class HomePage extends StatelessWidget {   @override   Widget build(BuildContext context) => new Scaffold(     appBar: new AppBar(       backgroundColor: new Color(0xFF26C6DA),     ),     body: new Column(       children: <Widget>[         new Card(           child: new Column(             mainAxisSize: MainAxisSize.min,             children: <Widget>[               const ListTile(                 leading: const Icon(Icons.album),                 title: const Text('The Enchanted Nightingale'),                 subtitle: const Text('Music by Julie Gable. Lyrics by Sidney Stein.'),               ),             ],           ),         ),         ...         ...         ...       ],     )       ); } 

enter image description here

like image 916
rafaelcb21 Avatar asked Jun 14 '17 22:06

rafaelcb21


People also ask

Why is my screen not scrolling?

If you are having problems with the scroll on your laptop's trackpad, there is something you can do before you take it into a computer repair shop. Updating the driver to the trackpad will enable the scroll if it is not working at all. Once the driver is updated, your scroll should work again.

How do I make my screen not scroll on flutter?

You should use ListView. builder in place of the inner column (as I suggested above that columns are not scrollable). Set shrinkWrap: true, and physics: ClampingScrollPhysics() inside ListView.


1 Answers

Columns don't scroll. Try replacing your outer Column with a ListView. You may need to put shrinkWrap: true on it.

like image 143
Collin Jackson Avatar answered Sep 29 '22 22:09

Collin Jackson