Automate migration of big project to Flutter Bloc 8.0 & above - flutter

I have a huge project which uses flutter_bloc: ^7.0.
-> I'd like to migrate it with the newest flutter_bloc version & accommodate the breaking changes that came with flutter_bloc 7.2
Is there a way for me to automate the changes without having to go to every file manually ?
I've heard I could automate the process via a code mod but I don't know what it is & how to use it..
Could someone please explain or is there maybe a more simple way maybe by just search and replace some things ?

I think there is no auto-migration.
but I have little project using:
flutter_bloc ^8.0.1
hydrated_bloc: ^8.0.0
here is the link
it might help you or for others

Related

Remove Web Part from Existing Flutter Project

How can I remove the web component part of a Flutter project? I have a project that when it was created was automatically created with web support. Now I am 100% certain the app won't be used for web and I just want to remove support for it. Is there a command in the terminal to help me do that?
I tried checking through the other questions but the others were asking how to disable web support altogether. I just want to remove web support on one project.
In order to fix this, I followed this link. The reason why I can't recreate the project easily is that the project has grown so much that it would be a big hassle to move it into another project. This happened after we updated all of our libraries to their latest versions respectively.
FirestoreWeb caused our project to stop compiling but since we aren't using Flutter web and we don't plan to use it for this project, it wouldn't make sense for us to implement it.
This answer was posted as an edit to the question Remove Web Part from Existing Flutter Project by the OP kobowo under CC BY-SA 4.0.

How to import flutter module to a flutter project?

I have a flutter module project and I want to import it into another existing flutter project, how can I do this?
I think this may not be possible since there will be two main function and don't know how they communicate.
Are there any suggestion so I can combine the these two things? I want to open the module app in another flutter app.
Flutter yet to support this feature out of the box, see issue #64542 for more details.
Since the feature request that was mentioned in above is still open, the best solution that I can think of is by merging another application to your existing flutter application by importing the application you want to merge as a module. Check also this SO post, where this kind of scenario was explained.

Flutter way to implement clean architecture

I have started learning flutter after 5 years of android dev. And right now i am trying to implement multi modular clean architecture as i used to, when developing android, example of such architecture: https://github.com/android10/Android-CleanArchitecture
And i have ran into two issues i can't solve by on my own.
1) What type of flutter module should i use module/plugin/package? I want to make domian layer as simple as it could be(list of interfaces,mappers and dto's), in android it was written in plain kotlin without any android sdk's usage. It seems like domain layer should be package(because it doesn't have any platform specific code and seems to be the simplest module possible) and data layer should be plugin in case i would be forced to make some platform specific code here, but i am not sure. It would be great to have some suggestions here.
2) Maybe there is a github repo example, as I have shown above? All git repos i have found so far are implementing clean architecture with just folders and this approach always ends up with dependencies mess, loosing all the profit you can get from clean architecture.
Any help is appreciated!
You could pay attention to the library clean_architecture (https://pub.dev/packages/clean_architecture).
It may be possible to implement a clean architecture not by all the rules, but it brings a certain useful result.
In the near future I will add instructions on how to use it

How to Repack a Flutter Plugins to use for Flutter Web?

for this specific case, I'm trying to use Provider on Flutter Web,
but I'm sure that this will not be the last flutter package
that I will use on flutter web, so I'm trying to understand
how to solve this as a generic situation.
I came across this question :
Using flutter mobile packages in flutter web
and this answer:
you can also use libraries that are referencing Flutter framework that was repackaged for flutter_web. Like provider was forked [link]. You only can't use plugins atm.
For my understanding the suggested procedure is
Fork
Repack
Import
While "Fork" is straight forward, feel the need to ask:
How to Repack a Flutter Plugins to use for Flutter Web?
since this time I got lucky and Kevin already did the repacking
How do I import it? [edit: nevermind... ]
Thank you in advance
got the answer here
just
clone the repository you want to use,
copy the files in your project
fix the errors
then everything should work

Is there any code inpector like sonarqube for flutter

Is there any code inspector like sonarqube for flutter.
As I am building a mobile app using flutter, I want my code quality very good. That's why I was searching sonarqube for flutter, but I was not able to find this.
I just released a Flutter / Dart plugin for SonarQube.
It is here : https://github.com/insideapp-oss/sonar-flutter
You can add analysis_options.yaml in the root of your project to enable extra checks and customize static analysis. You can read about it here
hope you are doing good.
While working on Azure CI integration, I come to know that there is no official support for flutter/dart from official 'SONAR QUBE'.
It will be great if flutter/dart community/people/developer cast their votes here:
https://community.sonarsource.com/t/support-for-dart/13555