Bennik2000 / DHBWStudentInformationApp

The DHBW student app offers you the opportunity to view your schedule on your smartphone. You can also view the grades from Dualis directly in the app.
GNU Affero General Public License v3.0
48 stars 9 forks source link

Buildrunner #130

Open Leptopoda opened 2 years ago

Leptopoda commented 2 years ago

Facilitate buildrunner for generating dart code for us.

Buildrunner is a dart package that can be extended for procedural code generation. This PR implements it for the serialization of objects, generating copyWith methods and generating asset binding.

All generated code is likely better null aware and can reduce bugs while easing the coding. adding the serialization capability to the our objects eliminates the use of *Entity classes.

Generated code is in lib/assets.dart and for classes in class_name.g.dart next to the class in general. To run the buildrunner use flutter pub run build_runner build. Currently the generated code is checked into the git repo to ease the first use dev experience although they could be removed.

This PR is based on the lining branch wich itself is based on the nullsafety one. They need to be reviewed first.