-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 1.22Found to occur in 1.22Found to occur in 1.22found in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
- The SliverAppBar is beneath everything else.
- ShrinkWrap doesn't lock scrolling when there is no overflow
- SliverAppBar scrolls up when you scroll down
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
bool overflowing = true;
_handleTap() {
setState(() {
overflowing = !overflowing;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Sandbox',
home: Scaffold(
body: CustomScrollView(
shrinkWrap: true,
slivers: <Widget>[
/// AppBar
SliverAppBar(
pinned: true,
actions: <Widget>[
IconButton(
icon: Icon(Icons.swap_calls),
onPressed: _handleTap,
),
],
),
/// Header
SliverToBoxAdapter(
child: Container(
constraints: BoxConstraints(minHeight: overflowing ? 900 : 300),
color: Colors.green.shade100,
alignment: Alignment.center,
child: Text("Header"),
),
),
/// Footer
SliverToBoxAdapter(
child: Container(
height: 100,
color: Colors.blue.shade100,
alignment: Alignment.center,
child: Text("Footer"),
),
),
],
),
),
);
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 1.22Found to occur in 1.22Found to occur in 1.22found in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
