Is it possible to publish your flutter app template to pub.dev - flutter

I wonder if i can publish my own flutter app template and make people use it like
flutter create example_app --template=barans_template
I see some packages do the pub global activate ..... thing, I thought maybe I can do it similar to this way but I have no idea.

Related

I want to do something like displaying the OSS license for the Google Ads app in Flutter

I'm sorry I'm not good at English.
I'm currently developing an Android app on Flutter.The Google Ads app seems to be using Flutter and I want to do something like the license display screen for that app.
I understood how to show the license display of the Flutter package by
showLicensePage();
But I can't show the license of Java Package which flutter package depends on.
Is there any way to show the Java lib license in ShowLicensePage?
Or I should pick up each package dependencies from build.gradle file? It's very bothersome.
If Flutter uses a package called A and A uses a Java package called com.example.example (it says implementation com.example.example: 1.0.0 etc.), com.example.example depends on it. Do I have to write various packages etc.?
I want to show licenses like Google Ads app.
Please tell me how to show it.

Do iOS and Android Flutter widgets also work on Flutter Web(PWA)

I'm interested in using Flutter primarily for my startup MVP on Web and possibly Android. I see the flutter community has made a lot of widgets but a lot of them are tagged iOS or Android. Since Futter is all about using one codebase is it wrong to assume that these widgets would work on web too? I imagine the setup would be different but similar with a Flutter web app as opposed to a Flutter Android app.
I couldn't find a whole lot about this on the Flutter site. I also know that web is still beta but by the time I'm done with the MVP it'll probably be at stable release or close enough.
Well... It depends. If the widget has some sort of native code the answer is no. In Flutter there are two type of packages: the "normal" package, and the plugin.
The packages are made only of dart code, so there are no bounds to native, and you can use everywhere dart (and Flutter) can run.
The plugins are packages with native code and you can use only on the platform supported by that plugin.
For example the package provider, it's a package, and you can use in every supported platform where dart (and Flutter) can run. But url_launcher, it's a plugin, so you can run only on Android, iOS, and web, but for example on desktop, it will no work.
If the package if you found it's only a widget, you should be able to use on the web.
TLDR: No,a PWA it's a web app, so it can't run Android or iOS specific code.

Share dependencies from a package flutter

I'm developing a flutter library package. In this package I used some other dependencies, for example the url_launcher like this:
dependencies:
flutter:
sdk: flutter
url_launcher: ^5.5.0
When I import my package into the flutter app, I can't reference to url_launcher in the code until I add it into app pubspec.yaml dependencies
I wonder is there any way to share the imported dependencies from my library package so that I don't need to import again in the app?
I guess, currently there is no specified way to do this. To give you an example, I would pick this package called Chewie. What is does is:
It sits on top of a plugin called video_player, and added some cool controller.
CATCH: Since it uses video_player extensively to give away the nicer controller, however, you still need to import the video_player in your app. Otherwise, your app will crash.
WHAT YOU CAN DO?
You can mention in your documentation stating about having that dependency in the project, like the chewie plugin does. This will help people know about those things before hand, and I am sure, if your plugin is great [which is, IT SAVES TIME], people won't mind adding just another single line in their pubspec.yaml file. Otherwise, they would have done it via url_launcher but they can't. Hahaha!
Guess that will give you some clarity.
Also, do give a read on this Developing Packages

flutter P2P communication over the network

I read this Android specific article and was wondering if some applications existed for Flutter aswell.
I know it is possible to run native code in Flutter, but I'd prefer a Dart native solution. I've noticed this package on pub.dev but I cannot make it work.
I've followed the posted example but I get a MissingPluginException for every call the plugin executes.
Yes You can do it by using this package .
https://pub.dev/packages/flutter_nearby_connections

Is there any way i can buid an android app/content blocker in flutter

I am trying to create an android app that can block content/apps whenever something happens but i cant find any documentation in Flutter. I understand that what i want to do is more of native. Any recommendations.