Skip to content

Instantly share code, notes, and snippets.

@itsJoKr
Last active March 9, 2020 12:35
Show Gist options
  • Save itsJoKr/d585b3a7bfc41719fc5b73fb0c9b7034 to your computer and use it in GitHub Desktop.
Save itsJoKr/d585b3a7bfc41719fc5b73fb0c9b7034 to your computer and use it in GitHub Desktop.
NestedScrollView with issue
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: NestedScrollView(
headerSliverBuilder: (_, __) => <Widget>[
SliverAppBar(
expandedHeight: 220,
pinned: true,
flexibleSpace: Container(color: Colors.grey, height: 220,),
),
],
body: ListView.builder(itemBuilder: (context, index) {
return Padding(
padding: const EdgeInsets.only(bottom: 24.0),
child: _row());
}, itemCount: 4,)
));
}
Widget _row() {
return Container(color: Colors.green, height: 500);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment