scrolling screen flutter code example

Example 1: make scaffold scrollable flutter

@override
 Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(
      title: Text('News'),
    ),
    body: SingleChildScrollView(  // <-- wrap this around
      child: Column(
        children: <Widget>[
        ],
      ),
    ));
  }

Example 2: how to scroll screen in flutter

// Add SingleChildScrollView or add items in ListView
@override
 Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(
      title: Text('News'),
    ),
    body: SingleChildScrollView(
      child: Column(
        children: <Widget>[
        ],
      ),
    ));
  }

Tags:

Java Example