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

indexBarAlignment always centers. #77

Open
pcelis19 opened this issue Jun 9, 2022 · 0 comments
Open

indexBarAlignment always centers. #77

pcelis19 opened this issue Jun 9, 2022 · 0 comments

Comments

@pcelis19
Copy link

pcelis19 commented Jun 9, 2022

indexBarAlignment centers no matter what. So if a user puts Alignment.topRight because of the Container in the build method always applying a center alignment; Alignment.topRight technically becomes Alignment.centerRight.

the line that is causing the problem is:
azlistview/lib/src/index_bar.dart: line 463. Removing this line fixed it for me.

  @override
  Widget build(BuildContext context) {
    return Container(
      color: _isActionDown() ? widget.options.downColor : widget.options.color,
      decoration: _isActionDown()
          ? widget.options.downDecoration
          : widget.options.decoration,
      width: widget.width,
      height: widget.height,
      margin: widget.margin,
      // alignment: Alignment.center, // this line should be deleted
      child: BaseIndexBar(
        data: widget.data,
        width: widget.width,
        itemHeight: widget.itemHeight,
        hapticFeedback: widget.options.hapticFeedback,
        itemBuilder: (BuildContext context, int index) {
          return _buildItem(context, index);
        },
        indexBarDragNotifier: widget.indexBarDragNotifier,
      ),
    );
  }
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

1 participant