Coder Social home page Coder Social logo

Custom Icon support about google_nav_bar HOT 9 CLOSED

sooxt98 avatar sooxt98 commented on May 12, 2024
Custom Icon support

from google_nav_bar.

Comments (9)

sooxt98 avatar sooxt98 commented on May 12, 2024

just use the leading param in GButton, check out the example

leading: selectedIndex == 1 || badge == 0

from google_nav_bar.

golnarSheikhBahaie avatar golnarSheikhBahaie commented on May 12, 2024

thnx a lot ;)

from google_nav_bar.

Amr1440 avatar Amr1440 commented on May 12, 2024

Sorry i didnt understand what do you mean ?
what i want do is like this :
Image.asset('assets/images/profile.png'),
@sooxt98

from google_nav_bar.

Amr1440 avatar Amr1440 commented on May 12, 2024

@golnarSheikhBahaie Can you please explain @sooxt98 answer to me ?

from google_nav_bar.

sooxt98 avatar sooxt98 commented on May 12, 2024

@Amr1440 Just do this, you're good to go.

GButton(
  // icon: LineIcons.home,
  leading: Image.asset('assets/images/profile.png'),
  text: 'Home',
),

Besides, you could always check back to the example provided

leading: CircleAvatar(

from google_nav_bar.

 avatar commented on May 12, 2024

Icon is required even when you use leading image.

from google_nav_bar.

 avatar commented on May 12, 2024

Icon is required even when you use leading image.

Please remove required at least so we can use custom images as Icon or support for Icons natively would be great so we can use assetIcons. Great package but can't seem to go around it.

from google_nav_bar.

sooxt98 avatar sooxt98 commented on May 12, 2024

from google_nav_bar.

 avatar commented on May 12, 2024

It’s by design, firstly icon can’t be null it’s required to make all the tabbar leading size stays consistent. Leading accepts any widget, you just have to pass in dummy icon data as a default size placeholder.

On Tue, 24 Aug 2021 at 2:50 AM, RazaShabbir-vrc @.***> wrote: Icon is required even when you use leading image. Please remove required at least so we can use custom images as Icon or support for Icons natively would be great so we can use assetIcons. Great package but can't seem to go around it. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#58 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGCEC4DCONUN66VZZJC3KLT6KJ6BANCNFSM44ESXJTQ .

Got it, I think this resolves it. Thanks for the awesome package!

from google_nav_bar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.