Thank you for such a great explanation. I've been curious about creating my own packages for the longest, and the idea was daunting thinking it would be a difficult process. I'm glad it's fairly simple. Keep up the good content!
Thanks Andrea, excellent tutorial again! Instead of using the part of setup, I would also mention/recommend the /src sub folder structure with your classes/functions as files in it, and then in the package root folder exporting only the classes that are a part of the API the package needs to expose. This as per the guides in Dart/Flutter libs documentation. Sure for smaller libs Part of, is ok too. Although in the Flutter style guide wiki using Part is not recommended even as a general practice, with the rationale that it may create spaghetti code that is harder to reason about, over the layered lasagna model.
Hey Andrea, thanks for this excellent tutorial. I am having trouble creating a Monorep for packages. Can you please do a tutorial on that. Or share any guides/references. Again, thanks.
Enjoyed the video. Thanks a lot. One question: the package you create has no flutter dependencies and it might be a good candidate for a pure dart package. How would you achieve this?
Good observation. You can just remove the flutter sdk as a dependency: # flutter: # sdk: flutter And also remove this: #dev_dependencies: # flutter_test: # sdk: flutter
Hi Andrea! Thanks for this great video again. I have a question for you if you’d like to answer. I have developed a fairly complex widget especially for working on Flutter Web. It is aimed for enterprise webapps and it has a commercial value. Can I turn it into a private package? (I think I can’t) I’d like people not to see the source code but to use widget in their apps. In other words, can I provide people commercial paid licensing to use my package?
ariky If you publish it on pub.dev or any other location from where your package maybe imported into a project, the source code is when you get the package downloaded and cached into the computer using the code. It is easy to find and see this code on the computer and even copy it to another folder and make your own version of it. I think the Syncfusion Flutter charting package is an example, it has a commercial license and its source is not publicly available on GitHub, but the code can still be found and viewed after you include the package in a project, eg by building their demo app.
I think there are various ways of approaching this. If you want to charge for access to your repo/library, then you could keep it private, and add your customers as collaborators once they paid you. This page has more info on licensing: help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository I also found this: github.com/mrjoelkemp/awesome-paid-open-source A while ago someone told me they had a product for selectively making parts of a repository paid (and private). I thought it was a great idea, but I can't find the link anymore :/
Mike Rydstrom a bit late but I didn’t get a notification. Thank you for your insight about this. I thought the same. If it is released somehow, it can be viewed. Thanks for the example too.
Code With Andrea thank you Andrea. I’m a bit late to response because I didn’t get a notification. Those links are very helpful for me! Thanks for pointing me to the right direction.
Thanks andrea, i follow u from your course and in youtube. It really helps a lot for my coding skill. I would like to ask, if i want to share the package locally for different apps, may i know how to handle it ?
Thanks for video. Just I noticed that you use syntax with library name \\ part of my_library \\ while official documentation tells that its bad syntax and exists for legacy reasons, instead recommended to use URI string that points directly to the library file. part of '../my_library.dart';
Thanks a lot brother, Today i learned how to create packages.
Thank you for such a great explanation. I've been curious about creating my own packages for the longest, and the idea was daunting thinking it would be a difficult process. I'm glad it's fairly simple. Keep up the good content!
Thanks Andrea, excellent tutorial again!
Instead of using the part of setup, I would also mention/recommend the /src sub folder structure with your classes/functions as files in it, and then in the package root folder exporting only the classes that are a part of the API the package needs to expose. This as per the guides in Dart/Flutter libs documentation. Sure for smaller libs Part of, is ok too. Although in the Flutter style guide wiki using Part is not recommended even as a general practice, with the rationale that it may create spaghetti code that is harder to reason about, over the layered lasagna model.
That's a very good observation, thanks for pointing that out. I may cover export and how to use it as a follow-up tutorial.
Just wonderful! With DART and your tutorial, I can make better coded apps!!! Thank you so much!
Excellent Tutorial Dude !!!
This is immensely helpful! Thank you, Andrea.
To the point tutorial.superb👍🏻
Thanks a lot for this tutorial. Brief and clear! Keep it up Andrea!
Easy to follow and understand. Thank you very much.
Thanks a lot ❤
Great Video 🙏🏻❤
Hey Andrea, thanks for this excellent tutorial. I am having trouble creating a Monorep for packages. Can you please do a tutorial on that. Or share any guides/references. Again, thanks.
Thank you for this excellent tutorial.
i really appropriate the emerge bro
Awesome Tutorial, Thank you for this.
also can someone share info about the icon and overall theme?
I think it’s called Dark-Dracula?
Enjoyed the video. Thanks a lot. One question: the package you create has no flutter dependencies and it might be a good candidate for a pure dart package. How would you achieve this?
Good observation. You can just remove the flutter sdk as a dependency:
# flutter:
# sdk: flutter
And also remove this:
#dev_dependencies:
# flutter_test:
# sdk: flutter
Hi Andrea! Thanks for this great video again. I have a question for you if you’d like to answer.
I have developed a fairly complex widget especially for working on Flutter Web. It is aimed for enterprise webapps and it has a commercial value.
Can I turn it into a private package? (I think I can’t) I’d like people not to see the source code but to use widget in their apps.
In other words, can I provide people commercial paid licensing to use my package?
ariky If you publish it on pub.dev or any other location from where your package maybe imported into a project, the source code is when you get the package downloaded and cached into the computer using the code. It is easy to find and see this code on the computer and even copy it to another folder and make your own version of it. I think the Syncfusion Flutter charting package is an example, it has a commercial license and its source is not publicly available on GitHub, but the code can still be found and viewed after you include the package in a project, eg by building their demo app.
I think there are various ways of approaching this.
If you want to charge for access to your repo/library, then you could keep it private, and add your customers as collaborators once they paid you.
This page has more info on licensing:
help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository
I also found this:
github.com/mrjoelkemp/awesome-paid-open-source
A while ago someone told me they had a product for selectively making parts of a repository paid (and private). I thought it was a great idea, but I can't find the link anymore :/
Mike Rydstrom a bit late but I didn’t get a notification. Thank you for your insight about this. I thought the same. If it is released somehow, it can be viewed.
Thanks for the example too.
Code With Andrea thank you Andrea. I’m a bit late to response because I didn’t get a notification.
Those links are very helpful for me! Thanks for pointing me to the right direction.
Thank you, learn a lot from this video. May I know can I create Dart Plugin same way as creating dart packages like this.
Very well done!
Thanks andrea, i follow u from your course and in youtube. It really helps a lot for my coding skill.
I would like to ask, if i want to share the package locally for different apps, may i know how to handle it ?
I think i find a solution. Thanks
absolute path to file - by adding file:// URI prefix we can reference a library file that is on the computer
Je vous remercies infiniment pour votre explication.
Is it possible to create a package that reads/writes to Firestore?
I wanted to know how to move calculations to another dart file :(
how it works without typing "export" keyword?
Man your awsem...
Sir plz tell me in a different format
You always talk so fast, bro
Thanks for video. Just I noticed that you use syntax with library name \\ part of my_library \\ while official documentation tells that its bad syntax and exists for legacy reasons, instead recommended to use URI string that points directly to the library file. part of '../my_library.dart';
Thanks a lot for this tutorial. Really helpful.