When I use the panel with Scaffold and AppBar the panel's body position offsets down for the AppBar's height and it goes beyond the boundaries of the screen. If I set extendBodyBehindAppBar= true body position looks OK, but in this case an extra space appears at the top of the panel.
To Reproduce
See the code sample below.
The result with extendBodyBehindAppBar: false and extendBodyBehindAppBar: true is shown on the screenshots.
Expected behavior
The panel's content is placed in the area between AppBar and bottom of the screen and does not go beyond.
Screenshots
Additional context
Add any other context about the problem here.
Smartphone (please complete the following information):
Device: iPhone 12 mini Simulator, iPhone Xs real device
Describe the bug
When I use the panel with Scaffold and AppBar the panel's body position offsets down for the AppBar's height and it goes beyond the boundaries of the screen. If I set extendBodyBehindAppBar= true body position looks OK, but in this case an extra space appears at the top of the panel.
To Reproduce
See the code sample below.
The result with extendBodyBehindAppBar: false and extendBodyBehindAppBar: true is shown on the screenshots.
Expected behavior
The panel's content is placed in the area between AppBar and bottom of the screen and does not go beyond.
Screenshots
Additional context Add any other context about the problem here.
Smartphone (please complete the following information):
Sample
main.dart
This is my code:
`
import 'package:flutter/material.dart'; import 'package:sliding_up_panel/sliding_up_panel.dart';
void main() { runApp(MyApp()); }
class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }
class _MyAppState extends State {
PanelController _pc = new PanelController();
@override Widget build(BuildContext context) { return MaterialApp( title: 'Работа рядом', theme: ThemeData( primaryColor: Color(0xFFF5F5F5), appBarTheme: AppBarTheme( elevation: 0, ) ), home: Scaffold( extendBodyBehindAppBar: true, backgroundColor: Colors.white, appBar: AppBar( title: Text("Test"), ), body: SlidingUpPanel( minHeight: 200, maxHeight: 200, defaultPanelState: PanelState.OPEN, controller: _pc, panelBuilder: (ScrollController sc) => _scrollingList(sc), body: Center(child: Text("Center")), ) ) ); }
Widget _scrollingList(ScrollController sc) { return Container( padding: const EdgeInsets.only( left: 0.0, top: 30.0, right: 0.0, bottom: 0.0), margin: const EdgeInsets.all(0.0), child: ListView.builder( controller: sc, itemCount: 50, itemBuilder: (BuildContext context, int i) { return Container( padding: const EdgeInsets.all(16.0), child: Text("$i"), ); }, ), ); }
} `