ziofat / material_design_icons_flutter Goto Github PK
View Code? Open in Web Editor NEWThe Material Design Icons (https://materialdesignicons.com/) Icon pack available as set of Flutter Icons.
License: MIT License
The Material Design Icons (https://materialdesignicons.com/) Icon pack available as set of Flutter Icons.
License: MIT License
when is null safety coming out
Hey there,
you already provide a share-off icon.
I'd like to use this on the share variant icon.
Would you create that icon?
Thank you very much!
Hi,
I'm trying to dynamically add an icon but it can be wrong and when i use MdiIcons.fromString()
with a wrong icon, i got this error:
The method 'toRadixString' was called on null.
Receiver: null
Tried calling: toRadixString(16)
I think it could be nice to return something like null if the icon doesn't exist.
I made a simple pull request to handle error, i don't know if it's the right way.
#15
Thanks
Hello, thank you for this great package.
I using late binding and would like to define Icons by there name like MdiIcons('sword').
That would allow me to define the icons in the domain without the reference of the package and I could create the UI dynamically in run-time.
Most of the users were started updating to Flutter 2.0 with Null Safety, unfortunately this package not yet reached null safety version. Please have us null safety version of this package as soon as possible.
Thanks for contributing!
I understand that not all icons are in the package?
For example: handshake
not found
As it looks to me the package is auto generated based on the MDI font.
(Or that is how i've done it with the simple icons package)
Please consider adding a static list, where one can get all the icons at one.
Example:
static const List<IconData> all = [
MdiIcons.abTesting,
];
Every user of the library could implement this themself, but with so many icons this would take a lot of time.
Under the premise that the mdi.dart
is autogenerated, this might be just one line of code for you 🙏 .
Example Use Case:
There is the icon_picker which takes a Map<String, IconData> of icons. For performance improvements an already existing const List or Map of IconData might be beneficial.
Hi. It looks that materialdesignicons.com is down. Is there any chances to browse icons in another place? Thanks.
If you put an icon from the material "Icons" inside a coloured Container, you'll notice it is perfectly centered. If you do so with any of the "MdiIcons" (even if you pick an icon that is also on the standard material library) you'll see it has a bit of a top padding and that breaks most of the buttons that use this library because seeing a FloatingActionButton with a non centered icon in it is not that pretty.
Is there even a solution to this?
Hi, I found there are some icons that I want to use in materialdesignicons.com missing from this package. Can you please update the icons when you have time? Thank you very much for your hard work.
I Can't find store-remove icon, I'm using 4.0.5755
This library is missing some of the official material design icons.
For example, "fast rewind"
Are there any plans to add these at some point?
Thanks
This commit broke our app: d1899c9
Lots of icons have different identifiers, for example settingsOutline
is now cog
. In my opinion this should be a major version bump to 4.x.
Why is mdi-blank not implemented?
It has been with MDI since version 1.7.
Please include it as there are some good use cases for it.
Thanks.
Hi,
I am using Flutter 3.10.4 and version 7.0.7296 of this library.
I noticed that somehow the tree shaking does not work correctly.
Maybe it has something to do with the changes in Flutter 3.10 (tree shake does now work for web as well)?
In my project I only use MdiIcons.XXX
. Nothing dynamic. I use around 125 icons.
In an older version the tree shaken materialdesignicons-webfont.ttf
was 18KB. Now its size is 1MB.
The Flutter build says:
Font asset "materialdesignicons-webfont.ttf" was tree-shaken, reducing it from 1279992 to 1034252 bytes (19.2% reduction).
Something is shaken off but not all of it. I looked into the ttf file with an online font viewer and there I see a lot of icons that are not used in my project.
Any idea where the problem comes from? Is there a bug?
Regards,
Florian
When I tried a few non-standard Mdi Icon like MdiIcons.fromString('power-socket-eu') it can't display on flutter ui, can you make it work?
https://iconify.design/icon-sets/mdi/power-socket-eu.html
Thank you, love the package.
Would be cool, if we could use the same logic that the inbuilt material icons use to display the icon in the autocomplete feature of the IDE.
/// <i class="material-icons-round md-36">timer_off</i> — material icon named "timer off" (round).
static const IconData timer_off_rounded = IconData(0xf023b, fontFamily: 'MaterialIcons');
/// <i class="material-icons-outlined md-36">timer_off</i> — material icon named "timer off" (outlined).
static const IconData timer_off_outlined = IconData(0xf449, fontFamily: 'MaterialIcons');
/// <i class="material-icons md-36">tips_and_updates</i> — material icon named "tips and updates".
static const IconData tips_and_updates = IconData(0xf058d, fontFamily: 'MaterialIcons');
Like this:
Current version is based on Material Design Icons 6.5.95.
Latest Material Design Icons version is 6.6.96.
Could you update this package to the latest version?
Only the Web. This example uses the same code with the same icon in MDI and in the native implementation. In this case, the icon is shifted in the MDI:
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
void main() async {
runApp(App());
}
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.light(),
home: AppCore(),
);
}
}
class AppCore extends StatefulWidget {
@override
_AppCoreState createState() => _AppCoreState();
}
class _AppCoreState extends State<AppCore> {
@override
Widget build(BuildContext context) {
return Row( crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: Icon(Icons.check_box_outline_blank, size: 68),
// child: Icon(MdiIcons.checkboxBlankOutline, size: 68),
decoration: BoxDecoration( color: Colors.red ),
clipBehavior: Clip.antiAlias,
)
],
);
}
}
Native:
MDI:
After upgrading flutter to 1.22.0, the following error occurred when trying to build the Android App bundle
This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:
- file:///C:/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/material_design_icons_flutter-4.0.5655/lib/material_design_icons_flutter.dart:5680:12
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Dev\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command 'C:\Dev\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Why does this package version is "5.0.6595"?.
It will be more professional to just increase the version to 5.1.0 wouldn't it?
the plugin is so good, but it's missing the tiktok icon
https://ziofat.github.io/material_design_icons_flutter/#/
Is there a way to show small icons in one page to browse all icons? It is not easy to see what icons it has.
Is there a way to preserve the values for the icon keys that you store in icon_map.dart ? It seems that each new release of this plugin - keys change values which will result in misleading and incorrect icons being displayed in apps that use this plugin.
Use case :
Thus, if the unicode integer value is stored and you then give a completely different value to a key that an app has previously persisted you end up with incorrect icons being shown.
A code solution
I appreciate that one can store the keyname but doing so in this way will 1) prevent tree shaking and 2) incur more in terms of cloud costs since strings incur more overhead than ints in cloud firestore.
To insulate against this problem, when you use one of the 3rd party apps/websites that creates a TTF from an SVG - one can specify a starting offset position as the basis for creating a unique unicode value. All we need to do is ensure that the unicode offset position is 1 more than the last icon unicode value in icon_map.
This assumes that values in icon_map are sequential.
What happened to me:
I used a process of elimination to remove, one by one, packages that I thought might be affecting performance, such as firebase suite, admob, unityads, etc. After about 8 hours, I really never expected that it would be material_design_icons_flutter, and it was because I really couldn't suspect it that I ranked it to the last.
In DevTools-Memory, you can see what it did, and yes, it loaded all the resources into memory, which obviously can't be done instantly.
After removing this package, there are no more delayed starts and app crashes.
My environment:
Device • Google Pixel 7
Flutter 3.19.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 54e66469a9 (11 days ago) • 2024-04-17 13:08:03 -0700
Engine • revision c4cd48e186
Tools • Dart 3.3.4 • DevTools 2.31.1
After reading https://github.com/flutter/flutter_web/tree/master/examples/gallery/web/assets, I am not quite sure what to do and if it's possible to use this package somehow in flutter_web. Thanks a lot.
Edited: by reading this commit, maybe flutter_web will be merged to flutter soon...
Hello,
When trying to import the library package:material_design_icons_flutter/material_design_icons_flutter.dart into my dart file it says that the "Target of URI doesn't exist".
Thanks in advanced!
Hi, I want to be able to see MdiIcons on the gutter of Android Studio.
When I set up Preferences > Languages & Frameworks > Flutter
Font Packages value to material_design_icons_flutter
, it shows this popup at the bottom right:
Also the pull request for this feature (flutter/flutter-intellij#5595) explicitly states that the icons are blank:
(image from that pull request)
As you can see, line 18 with MdiIcons icon has no gutter preview.
Can you please fix this?
Icon(MdiIcons.fromString(iconName))
No icons are shown for dark_mode, person_add, language and schedule.
material_design_icons_flutter: 7.0.7296
Please can you please migrate to null safety as its difficult to use this package with a project already using null safety
Or if you have script for updating you can push it, so anyone can fork and update package locally. And then of course submit pull request :)
And wondering how frequently is this repo being updated
Hi
I was hoping to use this icon
https://material.io/resources/icons/?search=device&icon=remember_me&style=baseline
But i cant seem to find it as an option on the current version
Thanks
Hello, I come across a question about this package cannot tree shake when build web.
The error is
`
This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:
The package version I use is 6.0.7096.
flutter doctor information:
[✓] Flutter (Channel master, 3.8.0-14.0.pre.6, on macOS 13.2.1 22D68 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.75.1)
[✓] Connected device (4 available)
Wish for your reply!
Hi, any plans to address missing and wrong icons? For example, the GROUP icon is supposed to show to people but shows a "select" icon, the construction and handyman icons are missing, and so on.
I get the following error:
Because *app_name depends on material_design_icons_flutter >=2.3.50 which requires SDK version >=1.19.0 <2.0.0, version solving failed.
pub upgrade failed (1)
Could you kindly update the dependencies so that it can work with the following?
Flutter 0.6.0 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 9299c02cf7 (2 weeks ago) • 2018-08-16 00:35:12 +0200
Engine • revision e3687f70c7
Tools • Dart 2.1.0-dev.0.0.flutter-be6309690f
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.