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

text below circle of the icon #23

Closed
tounoussiKhalid opened this issue May 22, 2019 · 12 comments
Closed

text below circle of the icon #23

tounoussiKhalid opened this issue May 22, 2019 · 12 comments

Comments

@tounoussiKhalid
Copy link

I am looking to implement this :
Screenshot_85

@rafalbednarczuk
Copy link
Owner

It's not possible with current version of plugin. Feel free to make pull requests.

@392354412
Copy link

It's not possible with current version of plugin. Feel free to make pull requests.

Have you implemented this function now?

@rafalbednarczuk
Copy link
Owner

It's not possible with current version of plugin. Feel free to make pull requests.

Have you implemented this function now?

No, if you have make pull request

@josephepia
Copy link

hello, haven't you created an alternative yet?

sorry for my English

@MstrZeroOne
Copy link

MstrZeroOne commented Nov 17, 2020

It's not possible with the current version of the plugin. Feel free to make pull requests.

I'm looking for this too. This is 2020/17/November. and this issue is from 2019. Did you add this to the plugin?

@rafalbednarczuk
Copy link
Owner

duplicate of #11

@itsahmed-dev
Copy link

I did it. Text disappears when you tap the icon.

Add if condition before Text widget and set the condition to index not question to index of that widget in the list as an integer. That's it.

@Technorocker
Copy link

@itsahmed-dev could you share the widget for how you implemented that. I did the condition to index but its still inside the circle and not on the bar itself and when its not selected the text does go away but the icon is shoved up while there is still an "empty" space taking up room.

Thanks ahead of time :)

@itsahmed-dev
Copy link

@Technorocker Here is my widget

class CurvedBarItems extends StatelessWidget {
  final int curvedIndex;
  final int index;
  final IconData? icon;
  final String label;
  const CurvedBarItems({
    Key? key,
    required this.index,
    required this.curvedIndex,
    this.icon,
    required this.label,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Icon(icon, size: 30.0),
        if (index != curvedIndex)
          Padding(
            padding: const EdgeInsets.only(top: 8.0),
            child: Text(
              label,
              style: const TextStyle(
                color: Colors.white,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
      ],
    );
  }
}

@Technorocker
Copy link

@itsahmed-dev Thank you for sharing. Did you have any problems with the icons being shifted upwards after you used your widget? I implemented it into my navbar but the icons and "shoved" up into the top of the navbar area. I took a screenshot to show you.

vext label alignment

@itsahmed-dev
Copy link

It looks like you can use some padding. Did you try that?

@Technorocker
Copy link

Technorocker commented Jan 30, 2023

Yes I did thank you, Here is my CurvedBarItems class I ended up with

class CurvedBarItems extends StatelessWidget {
  final int curvedIndex;
  final int index;
  final IconData? icon;
  final String label;
  const CurvedBarItems({
    Key? key,
    required this.index,
    required this.curvedIndex,
    this.icon,
    required this.label,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        if (index != curvedIndex) const SizedBox(height: 15),
        Icon(icon, size: index == 1 && curvedIndex == 1 ? 40.0 : 30.0),
        if (index != curvedIndex)
          Padding(
            padding: const EdgeInsets.only(top: 8.0),
            child: Text(
              label,
              style: const TextStyle(
                color: kPrimaryColor,
                fontWeight: FontWeight.bold,
                fontSize: 20,
              ),
            ),
          ),
      ],
    );
  }
}

Thanks for the tips.

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

7 participants