Closed sanjhi closed 3 years ago
Use leading param
Gbutton(leading: SvgPicture.asset())
Use leading param
Gbutton(leading: SvgPicture.asset())
38
This tells me : The named parameter icon is required.
I think icon should be nullable.
OR,
This icon parameter type is 'IconData'. You can make the type as 'Icon'.
The icon is for fallback purpose, simply place put one icon to it
On Sun, 19 May 2024, 7:53 pm AL-IMRAN, @.***> wrote:
Use leading param
Gbutton(leading: SvgPicture.asset())
38 https://github.com/sooxt98/google_nav_bar/issues/38
This tells me : The named parameter icon is required.
I think icon should be nullable.
— Reply to this email directly, view it on GitHub https://github.com/sooxt98/google_nav_bar/issues/68#issuecomment-2119208604, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGCECZAJC7ECXGN6BM3IU3ZDCHEPAVCNFSM5FZTFVQ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRHEZDAOBWGA2A . You are receiving this because you modified the open/close state.Message ID: @.***>
GButton(
leading: SvgPicture.asset(
"path",
height: 24,
width: 24,
),
icon: Icons.home,
text: 'Home',
),
I was getting run time error. Finally i found the reason. While using SvgPicture the height and width must be given. Sharing the code if it helps somebody like me.
I am trying to add SVG image as an icon in GButton, but it is not working. Please see the screenshot of error and guide how to resolve it?