The biggest move of this May Day was to upgrade LexPro from SDK 2.10 to 2.12+, which is the version number supported by Flutter2 +. Library features will be updated along with language features and framework features.
Previous ICONS (clickable) :
Sound NULL Safety version icon (optional) :
However, for current use, lexPro library reference still needs to be changed into LEXPRO_NULlsafety in Pubspec. yaml, which will be merged in lexpro3 after stabilization. The reason why the dual version is maintained is because of the requirement of gradual reconstruction. The first action of upgrading the old version project to the new version is to upgrade the dependent libraries to the NULl_safety version. However, there is a reference in the library project written by myself, so it is meaningless to upgrade the null_safety version first without upgrading the ontology.
Therefore, the NULl_safety version is an intermediate product, which will be uniformly changed back to LexPro ^3.0.0 when the ontology project reconstruction is completed
About refactoring
For refactoring, here is a step-by-step refactoring tutorial that is more hands-on.
For refactoring, you must first read and understand what has officially been updated that is worth the risk of breaking change
I want to say a few more words about refactoring, but it’s not as simple as the official tool that puts an exclamation mark at the end of what went wrong! Can avoid compilation errors, sound null safety characteristics is to require the programmer in setting function parameters and want it when I was a member variable is empty or is not empty, that is used to empty when use to judge way of thinking is different, empty judgment in compilation phase ahead of time, will save the possibility of a runtime error, But in the design of the coding phase, you may even have to change its type repeatedly depending on usage, which is critical when using iterable and embedding each other.
Again, the Sound null safety feature raises the question: Does our project structure have the ability to resist such breaking change? When you gradually refactor from utils and base packages with few dependencies to functional classes with high dependency and complexity, you will find the benefits of combination due to inheritance.
The finer the granularity, the easier it is to split and test.
When refactoring, breaking up projects and adding unit tests is a necessary investment, and you’ll find that problems you didn’t pay attention to before are software engineering debt.
About lexpro library
The LexPro library is a zero-to-one lexical parsing library extension that simplifies the development process and reduces dependencies by generating abstract syntax trees -AST directly from lexical parsing by embedding lifecycle hooks in the state machine.
Here is a code demo video showing the ability to create an editor with the Flutter framework:
Video presentation
The subsequent editor code may be open source for everyone to learn, you can leave a message to me.