We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.4.1 version work well. But 0.4.2 version work error.
Code are present below:
import 'dart:ui'; import 'package:app/core/app_export.dart'; import 'package:app/location/map_self.dart'; import 'package:smooth_sheets/smooth_sheets.dart'; class ContentSheet extends StatelessWidget { const ContentSheet({super.key, required this.ct,}); final Widget ct; @override Widget build(BuildContext context) { return LayoutBuilder( builder: (context, constraints) { final minH = constraints.maxHeight - mapH - 40; final minSheetExtent = Extent.pixels(minH); // final parentHeight = constraints.maxHeight; final sheetHeight = constraints.maxHeight - MediaQuery.of(context).padding.top ; final sheetPhysics = StretchingSheetPhysics( parent: SnappingSheetPhysics( // spring: SpringDescription.withDampingRatio( // mass: 1, // stiffness: 100.0, // ratio: 1.1, // ), snappingBehavior: SnapToNearest( snapTo: [ minSheetExtent, const Extent.proportional(1), ], ), ), ); return ScrollableSheet( physics: sheetPhysics, minExtent: minSheetExtent, initialExtent: minSheetExtent, child: SizedBox( height: sheetHeight, // child: ListView( // padding: EdgeInsets.zero, // shrinkWrap: true, // physics: NeverScrollableScrollPhysics(), // children: [ // ct, // ], // ), child: SingleChildScrollView( child: Container( height: 1000, color: C.red, ), ), // child: ct, ), ); }, ); }
The text was updated successfully, but these errors were encountered:
Thank you for your reporting, but I couldn't reproduce the error even with v0.4.2. Here's the code that I've used.
import 'package:flutter/material.dart'; import 'package:smooth_sheets/smooth_sheets.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( home: Scaffold( body: Stack( children: [ Placeholder(), ContentSheet(), ], ), ), ); } } const mapH = 200.0; class ContentSheet extends StatelessWidget { const ContentSheet({ super.key, // required this.ct, }); // final Widget ct; @override Widget build(BuildContext context) { return LayoutBuilder( builder: (context, constraints) { final minH = constraints.maxHeight - mapH - 40; final minSheetExtent = Extent.pixels(minH); // final parentHeight = constraints.maxHeight; final sheetHeight = constraints.maxHeight - MediaQuery.of(context).padding.top; final sheetPhysics = StretchingSheetPhysics( parent: SnappingSheetPhysics( // spring: SpringDescription.withDampingRatio( // mass: 1, // stiffness: 100.0, // ratio: 1.1, // ), snappingBehavior: SnapToNearest( snapTo: [ minSheetExtent, const Extent.proportional(1), ], ), ), ); return ScrollableSheet( physics: sheetPhysics, minExtent: minSheetExtent, initialExtent: minSheetExtent, child: SizedBox( height: sheetHeight, // child: ListView( // padding: EdgeInsets.zero, // shrinkWrap: true, // physics: NeverScrollableScrollPhysics(), // children: [ // ct, // ], // ), child: SingleChildScrollView( child: Container( height: 1000, color: Colors.red, ), ), // child: ct, ), ); }, ); } }
Can you give me more information about the missing part of your code, such as the widget that surrounds the ContentSheet widget?
Sorry, something went wrong.
No branches or pull requests
0.4.1 version work well. But 0.4.2 version work error.
Code are present below:
The text was updated successfully, but these errors were encountered: