i am facing an issue in IOS, on simulator it works perfectly but when i try on real device it just shows a widget with grey background please help. 😭
@amirvelasquez7874
4 ай бұрын
This video is gold, thank you!
@anandkrishna926
9 ай бұрын
This video was very helpful. Thanks. Please consider making a video that when we tap widget or a button in the widget we want to update data.
@MikeJones3
5 ай бұрын
Awesome video. WOundering if you could point me in the correct directin on if I want the user to manually pick a location when they add the widget to the homescreen?
@AbdullahGad95
9 ай бұрын
Thanks, bro, just one note, you don't have to use daviinci package home widget plugin has an internal method to transform a widget into an image final filePath = await HomeWidget.renderFlutterWidget(widget, key: 'filename', pixelRatio: 4, logicalSize: const Size(160, 320)); Also, I have a question, is there a way to add the widget directly to the mobile home screen without user intervention?
@YashMakan
9 ай бұрын
Thanks for the tip, I wasn't aware about renderFlutterWidget and after checking the CHANGELOG of the projects, it seems this method was added 5 months back to the package that is 3 months prior of the video. Thanks for adding the information here! Also, I don't think there's a way to programatically add widgets to home screen directly without manually adding for both android and ios but feel free to dig further and if you find anything regarding this then feel free to share here as it might help others! Thanks for watching the video...
@begula_real
4 ай бұрын
@@YashMakan the code in home_widget_config.dart should be like this: class HomeWidgetConfig { static Future update(context, Widget widget) async { // Capture the widget using home_widget's rendering capabilities // Render the widget and capture the image data String imageData = await HomeWidget.renderFlutterWidget( widget, // hover on .renderFlutterWidget to see documentation key: 'filename', pixelRatio: 4.0, // Adjust pixel ratio for desired image quality logicalSize: const Size(160, 320), // Set desired size for the widget ); // Update the home screen widget using home_widget // await HomeWidget.saveWidgetData('filename', tempFile.path); await HomeWidget.saveWidgetData('filename', imageData); await HomeWidget.updateWidget( iOSName: iosWidget, androidName: androidWidget); } static Future initialize() async { await HomeWidget.setAppGroupId(groupId); } } and then we can just remove davinci and path_provider package. i tried it, using your source code. and its working. your sorce code is really cool, thank you very much!
@begula_real
4 ай бұрын
@@YashMakan i think you can pin this comment, or you can create your own comment about this then pin it. i found this comment from @AbdullahGad95 kinda useful for me
@cdassaha5802
6 ай бұрын
Hi, I have followed almost all the steps you showed. Now the app is running successfully but can't find the app name in the widgets list (long pressed on home screen, then hit + at the top-left and searched). Can you help me what can be done or what's the issue? Also, I cloned your github project and didn't find the app name in the widgets list
@yrbediting5718
7 ай бұрын
Thank you so much for this amazing video
@mr_.a
7 ай бұрын
Great video, very helpful! Tell me, do you know if it is possible to somehow implement customization of the colors of the home_widget? For example, on my home_widget there is text and an icon, everything is white, and the background is blue. I would like the user to be able to edit the background to a different color or change the text color.
@mikemeetstec
11 ай бұрын
Epic video! Thanks.
@putinstop5940
11 ай бұрын
*Thank you*
@moaudalmousa
8 ай бұрын
when I click on the widget (android device) nothing happened ,it should open the app like at 0:20 of your video right ?
@moaudalmousa
8 ай бұрын
update : I found a solution add this lines at the top of your CustomHomeView.kt file import android.app.PendingIntent; import android.content.Intent then add this line inside the for loop and before the appWidgetManager.updateAppWidget views.setOnClickPendingIntent(R.id.widget_image, PendingIntent.getActivity(context, 0, Intent(context, MainActivity::class.java), PendingIntent.FLAG_IMMUTABLE))
@robin-co6nr
8 ай бұрын
Hey, nice video, but i have a question. When i update the widget, the widget has a small screenshot of the content implemented in "home_widget_config.dart". The rest of the widget gets filled up with black color. When I cover th whole widget with for ex. red in the "home_widget.dart"-Class, a small red screen appears on the home screen widget. Do you have a solution for this issue?
@YashMakan
8 ай бұрын
So try to use expanded widget while creating the home widget so when screenshot is taken the widget can be filled without the background or you can try to capture x, y size screenshot using davinci and use same dimensions for the widget. Hope you'll find the solution.
@tsaidarius3786
11 ай бұрын
if i want my widgets update automatically , should i add the workmanager to execute the background task?
@YashMakan
11 ай бұрын
Yes adding a background tasks executor like work manager will definitely help for updating the image. You can check out home widget repository on GitHub. There's a section of using work manager with home widget package.
@ibrahimkhalilshakir2414
8 ай бұрын
Not getting workmanager in the repo😢
@FLstudioProjectfiles
9 ай бұрын
Can I add Buttons that can be pressed from the home_widgets ?
@YashMakan
9 ай бұрын
buttons have to be part of the native code instead so operation can be performed on clicking. If button is added in flutter code, it would not be possible to detect which button is clicked as whole image is transferred as the home widget. Thanks for watching 😊
@tsaidarius3786
11 ай бұрын
damn bro such a good idea that using davinci . Never thought of this !
@YashMakan
11 ай бұрын
Thanks, it would be amazing if you could subscribe as well as I am uploading content like this consistently which you might find interesting. Anyways, glad you enjoyed this one. 😊
@tsaidarius3786
11 ай бұрын
@@YashMakan ok imma do it
@begula_real
4 ай бұрын
@@tsaidarius3786 see another comment, theres a new method from HomeWidget class so you dont really need davinci package --also path_provider package. maybe that method isnt famous yet when this video was made
@begula_real
4 ай бұрын
@@YashMakan i did it just a second ago. nice video and works!
Пікірлер: 29