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

Compatibility issue with flutter_sticky_header #29

Closed
pgulegin opened this issue Dec 7, 2018 · 1 comment
Closed

Compatibility issue with flutter_sticky_header #29

pgulegin opened this issue Dec 7, 2018 · 1 comment

Comments

@pgulegin
Copy link

pgulegin commented Dec 7, 2018

First off, I just wanted to say that I really enjoy this plugin, thank you for your development effort!

I am having a bit of an issue getting it to work correctly with another plugin titled flutter_sticky_header: https://pub.dartlang.org/packages/flutter_sticky_header

It appears that the title is sticky-ing to a location that is hidden away. Quick example:

import 'package:flutter/material.dart';
import 'package:flutter_sticky_header/flutter_sticky_header.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';

class TestView extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _State();
  }
}

class _State extends State<TestView> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          'Playground',
        ),
      ),
      body: SafeArea(
        child: SmartRefresher(
          child: CustomScrollView(
            slivers: <Widget>[
              SliverStickyHeader(
                header: Container(
                  padding: EdgeInsets.only(
                    left: 12.0,
                    top: 4.0,
                    right: 12.0,
                    bottom: 4.0,
                  ),
                  color: Colors.white,
                  child: Text(
                    'Title0',
                    style: TextStyle(
                      color: Colors.grey,
                      fontSize: 14.0,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ),
                sliver: SliverList(
                  delegate: SliverChildListDelegate(
                    [
                      Container(
                        height: 200.0,
                        color: Colors.red,
                      ),
                      Container(
                        height: 200.0,
                        color: Colors.blue,
                      ),
                      Container(
                        height: 200.0,
                        color: Colors.red,
                      ),
                      Container(
                        height: 200.0,
                        color: Colors.blue,
                      ),
                    ],
                  ),
                ),
              ),
              SliverStickyHeader(
                header: Container(
                  padding: EdgeInsets.only(
                    left: 12.0,
                    top: 4.0,
                    right: 12.0,
                    bottom: 4.0,
                  ),
                  color: Colors.white,
                  child: Text(
                    'Title1',
                    style: TextStyle(
                      color: Colors.grey,
                      fontSize: 14.0,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ),
                sliver: SliverList(
                  delegate: SliverChildListDelegate(
                    [
                      Container(
                        height: 200.0,
                        color: Colors.red,
                      ),
                      Container(
                        height: 200.0,
                        color: Colors.blue,
                      ),
                      Container(
                        height: 200.0,
                        color: Colors.red,
                      ),
                      Container(
                        height: 200.0,
                        color: Colors.blue,
                      ),
                    ],
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

I understand that this is not necessarily a bug with your package, I was just hoping to get some guidance.

Thank you for your time!

@peng8350
Copy link
Owner

peng8350 commented May 7, 2019

Since the 1.3.0 update, I have removed Positioned to implement the drop-down. Just tested, this problem has been fixed.

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

No branches or pull requests

2 participants