Making a scrollable flat button in Flutter application Making a scrollable flat button in Flutter application dart dart

Making a scrollable flat button in Flutter application


Have you tried this? Why do you need Expanded widget?

Container(  height: 20.0,  child: FlatButton(      onPressed: () {},      child: SingleChildScrollView(       child: Text('Lorem ipsum'),      ),  ),),

Gesture Detector should also work well.


Container(  height: 20.0,  child: FlatButton(      onPressed: () {},      child: SingleChildScrollView(       child: Text('Lorem ipsum'),      ),  ),),