How do I upload Icons from material-ui? - material-ui

I have run npm install using material-ui icons
npm install #material-ui/icons
and imported the search icon in my code but I have not getting any output.
import SearchIcon from "#material-ui/icons/Search";
when I call the search icon
<SearchIcon />
the program outputs a blank screen but without it the code works fine. Does anyone know why the icon is not showing?
This is my code if it helps

The icons are not exported as default on the Material UI library. Therefore you also shouldn't try to import them as default. Try something like this:
import { Search as SearchIcon } from "#mui/icons-material";

Related

How does the coloring work the latest Flutter SVG package (flutter_svg 2.0.0+1)

After upgrading the flutter_svg package to the latest version as of this date (2.0.0+1).
The linting says that the color member is depreciated, but there's this parameter called "colorFilter", but it has different enum properties that somehow render differently. Can someone explain how to just add normal color properties to an SVG or how the colorFilter properly works thanks.
Link to the package on pub dev
Please to you SVG package down grade to version and resolve this problem
In my case, I used ColorFilter.mode with BlendMode.scrIn and it works fine, other modes didn't seem to be working visiually properly. So if you want to set color to svg, it should work if you used it with right BlendMode.
P.S
I had bottom navigation where I had to change colors of active svg icons.
code example

Search option in syncfusion_flutter_pdfviewer package flutter does not work

My goal is to use the search option on pdf, I found this package but I am having trouble using it, Do you have any suggestions for me?
1- TextSearchOption in syncfusion_flutter_pdfviewer package doesn't work (it's not defined).1
2- Another case is when I use this option ( Link ) in pdf but it doesn't work when I enter a text to search
1 - In order to TextSearchOption work, you need to import the syncfusion pdf. Add import "package:syncfusion_flutter_pdf/pdf.dart"; at the top of the file.
https://help.syncfusion.com/flutter/pdf-viewer/text-search
Import ‘package:syncfusion_flutter_pdf/pdf.dart’ in the Dart code if
you use the TextSearchOption parameter.
This will make the text inside the parenthesis to be searched: _pdfViewerController.searchText('the'). It will show all the "the" found in the pdf.
Here's a working example of the code you show on your picture.
2 - The link also gives an example of how to implement a search bar:
https://help.syncfusion.com/flutter/pdf-viewer/text-search#how-to-create-and-display-a-custom-search-toolbar-with-the-search-features

Can not import font family

Hello everyone one i am trying to import a font family in my flutter project. I downloaded the ttf file and import it in the pubs pubspec.yaml like on the picture. I did pub get and get the following error: expected fonts to either be null or a list like on the picture. I also tried to add many assets but getting another error. I searched on Google about the error but found nothing. Please help mepuspec.yaml
You have to add a space between your dash and asset at line 44
YAML is a file format that is layout sensitive (see: https://www.cloudbees.com/blog/yaml-tutorial-everything-you-need-get-started)

Adobe XD to flutter all widgets not exporting

Recently, I downloaded a UI Kit. I am trying to convert this UI kit into flutter via xd to flutter plugin.
I have downloaded the plugin and trying to export all the widgets. I have given the proper path but it is not exporting at all, even it is not showing any error or something.
It's the 'prototype interactions' check box you have selected in settings. I just removed all the check boxes to get it working. That should at least get you moving. Just had the same issue.
first select the path folder you want to export the dart file then click export all widgets you can get all widgets dart files

Is window copyable in Flutter

I need copy data of window and add to clipboard. I searched and I found nothing.
I reiceved data from rest api with html tags and I use html view for render the html tag. that's why I can't selectable text.
How to copy data of window or body of stateful widget? Any idea?
If you want to copy text from your app, you can use the SelectableText widget. There was recently a Widget of the Week video on it here:
https://www.youtube.com/watch?v=ZSU3ZXOs6hc&vl=en
There isn't a way to copy images or other data except for text, as far as I know.
You can use the following package to capture a screenshot.
Add the following to install
dependencies:
screenshot: ^0.1.1
Then import it
import 'package:screenshot/screenshot.dart';
Example can be found here Screenshot Example
References
screenshot package