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

Wrong initial state while setting initialPage in PageController #1

Closed
hiking93 opened this issue Dec 10, 2018 · 2 comments
Closed

Wrong initial state while setting initialPage in PageController #1

hiking93 opened this issue Dec 10, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@hiking93
Copy link

When initialPage is set with value other than 0, page indicator still indicates page 0 before gesture events.

PageIndicatorContainer(
  pageView: PageView.builder(
    controller: PageController(initialPage: index),
    itemCount: media.length,
    itemBuilder: (context, index) => Stack(
          fit: StackFit.expand,
          children: [
            Center(child: CircularProgressIndicator()),
            FadeInImage.memoryNetwork(
                placeholder: kTransparentImage,
                image: media[index].url,
                fadeInDuration: Duration(milliseconds: 300),
                fit: BoxFit.contain),
          ],
        ),
    onPageChanged: _onPageChanged,
  ),
  length: media.length,
  padding: EdgeInsets.only(bottom: 8),
  indicatorColor: Color(0xaaaaaaaa),
  indicatorSelectorColor: Theme.of(context).accentColor,
  size: 8,
),
@CaiJingLong CaiJingLong added the bug Something isn't working label Dec 10, 2018
@CaiJingLong
Copy link
Owner

I'll check it out. If there's a problem, I'll fix it as soon as possible.

@CaiJingLong
Copy link
Owner

fixed in #2
use version 0.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants