Closed Amr1440 closed 2 years ago
just use the leading param in GButton, check out the example https://github.com/sooxt98/google_nav_bar/blob/30e04f0e22be305bf11fc8dbb9805e4842508854/example/lib/main_advance.dart#L100
thnx a lot ;)
Sorry i didnt understand what do you mean ?
what i want do is like this :
Image.asset('assets/images/profile.png'),
@sooxt98
@golnarSheikhBahaie Can you please explain @sooxt98 answer to me ?
@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 https://github.com/sooxt98/google_nav_bar/blob/30e04f0e22be305bf11fc8dbb9805e4842508854/example/lib/main_advance.dart#L139
Icon is required even when you use leading image.
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.
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 https://github.com/sooxt98/google_nav_bar/issues/58#issuecomment-904023355, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGCEC4DCONUN66VZZJC3KLT6KJ6BANCNFSM44ESXJTQ .
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!
Is it possible to use custom icons from assets ?