Flutter Icon showing Icons that were different than specified - flutter

When I tell the icon to be on one type it shows something completely different.
Icon(
Icons.ac_unit
),
It was supposed to be an ac unit but it's this instead. This even affects included
widgets like the calendar widget.

Try flutter clean & flutter pub cache repair to see if it resolves your issue.

Related

How can I control the Stoke ( thikness ) of the icons

when we put an Icon Like this
Icon(
Icons.notifications_outlined,
)
we can control the size and color... of that icon, but I want to control the Stroke width of the Icon (not the size of the icon, I want to control the width of the icon's line )
is it possible by any widget or any other way in flutter SDK?
please don't recommend packages of other icons
thanks
I didn't find any way from the flutter SDK to control the icons thinkers, I tried using CustomPainter, BoxShadow()...
alternatively, I used a different icons package which is the Ionicons, which belongs to the Ionic framework, I found out that there is a flutter package for those icons, see Ionicons
you can see a list of all icons here, https://ionic.io/ionicons
and they can be used like this:
Icon(Ionicons.add)
Icon(Ionicons.add_outline)
Icon(Ionicons.add_sharp)

[ Flutter :: notched FloatingActionButton weird issue ]

Well this weird bug seems to have appeared when i recently updated flutter and dart sdk via my android studio IDE.
It worked like a charm before...
here what happens :
this is what is expected
this is what i can have before a rebuild sometimes there is no notch at all...
So, to put words on the problem, the first picture is what i got so far and what i expect to have...
but recently, i did upgrade flutter N dart via the command line and had to face this weird bug...
Depending on the device here what i have :
first build of the screen : incomplete notch margin or even none at all !
when i do interact with a button or whatever provoke a screen rebuild : the notch is good again !
For example, the 2 screenshots come from the exact same screen, nothing changed but an only checkbox checked forcing the screen to rebuild after dirty state...
The problem is that i can't see anything to do since the code is as simple as :
bottomNavigationBar: BottomAppBar(
shape: CircularNotchedRectangle(),
...
floatingActionButtonLocation:
FloatingActionButtonLocation.centerDocked,
floatingActionButton: SizedBox(
height: 85.0,
width: 85.0,
child: FittedBox(
child: FloatingActionButton(
So, is it a known Flutter bug and just have to wait for a bugFix ?
Or can i do something and, if so, what ?
Thanks in advance ! :)
I have the same issue trying to change the page with the navigator and rebuilding one page that has the same bottom app bar with this notch, I think that there is some bug between the fab notch and the navigator.
The workaround in my case is to keep the same route for all the pages and manage more pages changing the widget structure with the state, so if you have 3 pages with this notch you can keep the same page route and change one big sub-widget for each page changing, for example, a state variable that keeps the page like an int that encode one page with a specific number, and when you update this variable the interface rebuild changing this page widget.
This is my workaround, hope that this bug could be solved early but meanwhile this work.
Some images of the bug:
I have this rendering behavior after the first app start and after each rebuild on the same page, note that I have the fab notch in my homepage so at the first start the rendering is good:
I have this behavior after each change of route page with all the Navigator methods, even if in the page the bottom app bar has the same configuration and should render the notch:
If could help someone I recreate the navigator with an inherited widget and a stateful widget on top of the widget tree, this approach gets around the bug, here is my app implementation:
https://github.com/simone-viozzi/progetto-programmazione-mobile/tree/main/flutter_app

wrong icons flutter android material

My app displays wrong icons.
In my material\icons.dart shows a totally diferent name for the icon.
Problem with flutter version. Nedded to the correct flutter version/update.

Some of material design icons are not defined flutter

Hey so I have this problem, I want to use some icons that are listed here but in my flutter it says the name isn't defined. I already tried to do flutter clean and the problem still exists (I need to use Icons.password and Icons.person_off). Do you have any idea how to fix it? Thanks in advance
Go on to the pubspec.yaml file and enable the material dependecies like
uses-material-design: true also if you still not found your icon then go to https://fonts.google.com/icons this page and search for your icon and after clicking on your icon it will show you the code for implementing that icon on web, android, flutter and IOS.

Flutter Material Icons rendering random icons on web

So in my flutter app, the material icons show properly in native, but in web, all have a different icon. What should or can I do with it?
This seems to be a cache problem which can either be solved by running flutter pub cache repair or running flutter clean between every step of changing a channel and upgrading it.