Generate Class Diagram From Flutter (Dart) Code
In this blog tutorial we will know how to reversed engineered dart code to generate class diagram in just few easy steps
Step 1: First of Go to https://pub.dev/ to search dcdg and setup it in your flutter pubspec.ymal
Step 2: go to plugins in your IDE and search for plant uml and select plant uml integration as shown as below in picture:
Step 3: got to the main.dart file and paste
“import ‘package:dcdg/dcdg.dart’;”
now run the app and that go to terminal and type
“Flutter pub global run dcdg” after this code will be generated will starting
“@startuml” and with ending “@enduml” copy that code to clipboard
Step 4: Go to new file
Select PlantUML file with class option and name it
After Creating the file paste the code to that file and that’s set