Skip to content
New issue

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

When slide direction is down, list view inside panel does not scroll #215

Open
zakton5 opened this issue Jan 15, 2021 · 0 comments · May be fixed by #217
Open

When slide direction is down, list view inside panel does not scroll #215

zakton5 opened this issue Jan 15, 2021 · 0 comments · May be fixed by #217

Comments

@zakton5
Copy link

zakton5 commented Jan 15, 2021

Describe the bug
See title.

To Reproduce
Use the code below. Set slideDirection to SlideDirection.DOWN. User panelBuilder to create a list.

Expected behavior
I expect to be able to scroll my list down in the panel

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Sample main.dart


import 'package:flutter/material.dart';
import 'package:sliding_up_panel/sliding_up_panel.dart';

void main() async {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'SlidingPanelListBug',
      home: SlidingPanelListBug(),
    );
  }
}

class SlidingPanelListBug extends StatefulWidget {
  SlidingPanelListBug({Key key}) : super(key: key);

  @override
  _SlidingPanelListBugState createState() => _SlidingPanelListBugState();
}

class _SlidingPanelListBugState extends State<SlidingPanelListBug> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('List Panel Bug')),
      body: SlidingUpPanel(
        minHeight: 100,
        maxHeight: 300,
        margin: const EdgeInsets.symmetric(horizontal: 16),
        slideDirection: SlideDirection.DOWN,
        color: Colors.white,
        parallaxEnabled: true,
        collapsed: Container(color: Colors.blue),
        panelBuilder: (ScrollController sc) {
          return ListView.builder(
            controller: sc,
            itemCount: 50,
            itemBuilder: (BuildContext context, int i) {
              return Container(
                color: Colors.red,
                padding: const EdgeInsets.all(12.0),
                child: Text("$i"),
              );
            },
          );
        },
        borderRadius: const BorderRadius.only(
          bottomLeft: Radius.circular(16.0),
          bottomRight: Radius.circular(16.0),
        ),
      ),
    );
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant