Dart Class Diagram Generator

Overview

Build Status

Dart Class Diagram Generator

A small command line utility to generate a class (UML or similar) diagram from a Dart package.

Examples

Below is a UML diagram of the dcdg source code, created with dcdg. You can find the PlantUML source in the example/ directory.

Example UML Diagram

Installation

Install from pub:

dart pub global activate dcdg

Install from clone:

dart pub global activate -s path .

Usage

From inside a Dart package directory:

dart pub global run dcdg

This will dump a PlantUML file to stdout. You can save it to a file instead with the -o option.

See --help for more options, including ways to filter what ends up in the output. You can find the help contents in USAGE.txt as well.

Examples

There are test fixtures in test/fixtures/. Each Dart package in this directory contains various (fake) classes. Try running DCDG against these fixtures to familiarize yourself with how it works.

Contributing

Pull requests are welcome! It is intended to be reasonably straightforward to add a new output format. Take a look at the DOT format implementation in lib/src/builders for an example.

If you have found a bug or have a feature request please open an issue.

Development

Format code using the tool/format.sh script. It will have a non-zero exit code if the formatting changed. That's fine, it does that so it can be used in CI.

Run the full test suite (including unit and functional tests) with tool/check.sh.

If you change the user interface or add features you should run tool/docs.sh to regenerate documentation and other resources. This script requires PlantUML.

Comments
  • Report crash on package without pub get

    Report crash on package without pub get

    The visitor barfs if an export uses a package: style URI rather than a relative path. Seems like it might be an analyzer bug (it may have something to do with https://github.com/dart-lang/sdk/issues/35174), but noting it here for the future. Example stack trace:

     dcdg --exported-only
    file:///home/george/w_common/lib/disposable.dart
    {DisposableManager, DisposableManagerV2, DisposableManagerV3, DisposableManagerV4, DisposableManagerV5, DisposableManagerV6, DisposableManagerV7, ObjectDisposedException}
    Unhandled exception:
    NoSuchMethodError: The method 'accept' was called on null.
    Receiver: null
    Tried calling: accept<void>(Instance of 'ClassElementCollector')
    #0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
    #1      ClassElementCollector.visitExportElement (package:dcdg/src/class_element_collector.dart:47:29)
    #2      ExportElementImpl.accept (package:analyzer/src/dart/element/element.dart:4668:53)
    #3      ElementImpl.safelyVisitChildren (package:analyzer/src/dart/element/element.dart:3616:15)
    #4      LibraryElementImpl.visitChildren (package:analyzer/src/dart/element/element.dart:6604:5)
    #5      RecursiveElementVisitor.visitLibraryElement (package:analyzer/dart/element/visitor.dart:265:13)
    #6      LibraryElementImpl.accept (package:analyzer/src/dart/element/element.dart:6488:53)
    #7      findClassElements (package:dcdg/src/find_class_elements.dart:49:33)
    <asynchronous suspension>
    #8      main (file:///home/george/dcdg.dart/bin/dcdg.dart:28:25)
    <asynchronous suspension>
    #9      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:298:32)
    #10     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
    
    enhancement 
    opened by glesica 13
  • How to get UML diagram for only the lib folder

    How to get UML diagram for only the lib folder

    I have it working for Flutter but for large projects the resulting UML is too complex since packages are included. Is there a way to get a UML just for the lib folder? I tried running from the lib folder but it changes the CWD to project root and then I get the same diagram.

    opened by nyck33 12
  • 'ConstTopLevelVariableElementImpl' is not a subtype of type 'FieldElement'

    'ConstTopLevelVariableElementImpl' is not a subtype of type 'FieldElement'

    Is this project unmaintained? I do believe that this software won't work with new dart versions...

    Unhandled exception:
    _ElementMismatchException: Element mismatch in C:\dev\flutter\tourhq\lib\core\models\enrollment_state.dart at C:\dev\flutter\tourhq\lib\core\models\enrollment_state.dart
    Caused by type 'ConstTopLevelVariableElementImpl' is not a subtype of type 'FieldElement'
    #0      DeclarationResolver.visitFieldDeclaration (package:analyzer/src/generated/declaration_resolver.dart:189:18)
    #1      FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4010:49)
    #2      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7687:20)
    #3      ExtensionDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:3934:14)
    #4      RecursiveAstVisitor.visitExtensionDeclaration (package:analyzer/dart/ast/visitor.dart:847:10)
    #5      ExtensionDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:3927:49)
    #6      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7687:20)
    #7      CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2167:21)
    #8      RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:727:10)
    #9      CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2146:49)
    #10     DeclarationResolver.resolve (package:analyzer/src/generated/declaration_resolver.dart:46:12)
    #11     LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:675:31)
    #12     LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:158:7)
    #13     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
    #14     LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:157:11)
    #15     LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:111:14)
    #16     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
    #17     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:110:43)
    #18     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1451:63)
    #19     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
    #20     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1428:20)
    #21     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1100:33)
    <asynchronous suspension>
    #22     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
    <asynchronous suspension>
    #23     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
    #24     ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:77:17)
    #25     new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:46:36)
    #26     findClassElements (package:dcdg/src/find_class_elements.dart:26:29)
    #27     main (file:///C:/Users/Zaki/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcdg-2.0.1/bin/dcdg.dart:28:25)
    #28     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    #29     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    
    
    #0      DeclarationResolver.resolve (package:analyzer/src/generated/declaration_resolver.dart:49:7)
    #1      LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:675:31)
    #2      LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:158:7)
    #3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
    #4      LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:157:11)
    #5      LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:111:14)
    #6      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
    #7      LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:110:43)
    #8      AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1451:63)
    #9      PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
    #10     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1428:20)
    #11     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1100:33)
    <asynchronous suspension>
    #12     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
    <asynchronous suspension>
    #13     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
    #14     ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:77:17)
    #15     new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:46:36)
    #16     findClassElements (package:dcdg/src/find_class_elements.dart:26:29)
    #17     main (file:///C:/Users/Zaki/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcdg-2.0.1/bin/dcdg.dart:28:25)
    #18     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    #19     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    
    #0      AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1487:9)
    #1      PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
    #2      AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1428:20)
    #3      AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1100:33)
    <asynchronous suspension>
    #4      AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
    <asynchronous suspension>
    #5      AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
    #6      ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:77:17)
    #7      new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:46:36)
    #8      findClassElements (package:dcdg/src/find_class_elements.dart:26:29)
    #9      main (file:///C:/Users/Zaki/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcdg-2.0.1/bin/dcdg.dart:28:25)
    #10     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    #11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    Unhandled exception:
    _ElementMismatchException: Element mismatch in C:\dev\flutter\tourhq\lib\core\models\enrollment_state.dart at C:\dev\flutter\tourhq\lib\core\models\enrollment_state.dart
    Caused by type 'ConstTopLevelVariableElementImpl' is not a subtype of type 'FieldElement'
    #0      DeclarationResolver.visitFieldDeclaration (package:analyzer/src/generated/declaration_resolver.dart:189:18)
    #1      FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4010:49)
    #2      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7687:20)
    #3      ExtensionDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:3934:14)
    #4      RecursiveAstVisitor.visitExtensionDeclaration (package:analyzer/dart/ast/visitor.dart:847:10)
    #5      ExtensionDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:3927:49)
    #6      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7687:20)
    #7      CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2167:21)
    #8      RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:727:10)
    #9      CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2146:49)
    #10     DeclarationResolver.resolve (package:analyzer/src/generated/declaration_resolver.dart:46:12)
    #11     LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:675:31)
    #12     LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:158:7)
    #13     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
    #14     LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:157:11)
    #15     LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:111:14)
    #16     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
    #17     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:110:43)
    #18     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1451:63)
    #19     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
    #20     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1428:20)
    #21     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1100:33)
    <asynchronous suspension>
    #22     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
    <asynchronous suspension>
    #23     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
    #24     ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:77:17)
    #25     new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:46:36)
    #26     findClassElements (package:dcdg/src/find_class_elements.dart:26:29)
    #27     main (file:///C:/Users/Zaki/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcdg-2.0.1/bin/dcdg.dart:28:25)
    #28     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    #29     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    
    
    #0      DeclarationResolver.resolve (package:analyzer/src/generated/declaration_resolver.dart:49:7)
    #1      LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:675:31)
    #2      LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:158:7)
    #3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
    #4      LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:157:11)
    #5      LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:111:14)
    #6      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
    #7      LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:110:43)
    #8      AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1451:63)
    #9      PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
    #10     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1428:20)
    #11     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1100:33)
    <asynchronous suspension>
    #12     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
    <asynchronous suspension>
    #13     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
    #14     ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:77:17)
    #15     new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:46:36)
    #16     findClassElements (package:dcdg/src/find_class_elements.dart:26:29)
    #17     main (file:///C:/Users/Zaki/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcdg-2.0.1/bin/dcdg.dart:28:25)
    #18     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    #19     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    
    #0      AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1487:9)
    #1      PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
    #2      AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1428:20)
    #3      AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1100:33)
    <asynchronous suspension>
    #4      AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2188:24)
    <asynchronous suspension>
    #5      AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2118:5)
    #6      ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:77:17)
    #7      new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:46:36)
    #8      findClassElements (package:dcdg/src/find_class_elements.dart:26:29)
    #9      main (file:///C:/Users/Zaki/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcdg-2.0.1/bin/dcdg.dart:28:25)
    #10     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
    #11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
    
    bug dependency 
    opened by mzakizadeh 5
  • --

    --"exclude" can act on package names

    • "--verbose" flag
    • exclude can act on package name, e.g. --exclude="^flutter"
    • Scripts can run on current Dart ("pub get" is deprecated / gone).
    opened by tiloc 4
  • Better documentation on exclude

    Better documentation on exclude

    I am trying to exclude any Flutter SDK packages from the output. I have tried a lot of variations: --exclude=^flutter.* --exclude=flutter.* --exclude=StatefulWidget --exclude=.*StatefulWidget

    none of these seem to have any effect. I am looking for better documentation on such a use-case and maybe a --verbose option for dcdg that prints out whether it believes something is a match. It is unclear to me whether the package names, such as flutter:: are part of the class name that needs to match.

    I have also attempted the --exported-only option as an alternative, but that leads to broken output with numerous repeating fields.

    opened by tiloc 4
  • "Unhandled exception:" error

    I'm always getting the following output when running dcdg:

    Unhandled exception: FileSystemException: Directory listing failed, path = '/home/mzamayias/Documents/Repositories/glowing-sniffle/Current Courses/Agile Programming/Assignments/Assignment 2/dart/simple_hearts_game/lib/' (OS Error: No such file or directory, errno = 2) #0 _Directory._fillWithDirectoryListing (dart:io-patch/directory_patch.dart:37:68) #1 _Directory.listSync (dart:io/directory_impl.dart:243:5) #2 findClassElements (package:dcdg/src/find_class_elements.dart:35:8) #3 main (file:///home/mzamayias/.pub-cache/hosted/pub.dartlang.org/dcdg-2.0.1/bin/dcdg.dart:28:25) #4 _startIsolate. (dart:isolate-patch/isolate_patch.dart:299:32) #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

    Am I doing something wrong? I've followed the instructions for installation and usage. Also, as this my first Issue report on GitHub, am I doing it right?

    opened by mzamayias 4
  • update dependencies in pubspec to latest versions

    update dependencies in pubspec to latest versions

    I get errors about version solving failed when including dcdg in my project. Reason is that the dependency versions in the pubspec are outdated. for example: analyzer is already at version 2.4.0 (is still at 1.1.0) version of test package is now at 1.18.2 (is still at 1.0.0)

    Any plans to upgrade to latest dependeny packages?

    dependency 
    opened by itadminmynapse 3
  • Not seeing all classes export to Plantuml

    Not seeing all classes export to Plantuml

    This might be an issue with Plantuml instead of this tool, but when I run plantuml against a .puml file generated by this tool, much of the .png seems to be missing. There are connection lines that go off the edge that I think should lead to the missing classes.

    Again, not sure if PlantUML is at fault or this tool isn't generating things correcly.

    opened by darrinps 3
  • Composition and Aggregation

    Composition and Aggregation

    Sorry if I'm missing something but does it currently have no support for Composition and Aggregation? It generates just extents for me. No has-a relationships.

    enhancement question 
    opened by DylandeWit 3
  • Bug: Duplicated fields when using 'part' keyword in dart

    Bug: Duplicated fields when using 'part' keyword in dart

    Discovered this bug because I am using the package json_serializable.

    When using the dart 'part' and 'part of' keywords, the class' fields, methods, and relationships get duplicated.

    For example: If I break a file into 2 parts, then everything in the diagram is doubled for that class. If I break a file into 3 parts, then everything in the diagram is tripled for that class.

    Example Code:

    // file_a.dart
    import 'file_b.dart';
    
    part 'file_a2.dart';
    
    class A extends B {
      final String _name;
    
      A(this._name);
    
      String get name => _getName(this);
    }
    
    //file_a2.dart
    part of 'file_a.dart';
    
    String _getName(A instance) => instance._name;
    
    //file_b.dart
    class B {}
    

    Creates this diagram: image

    bug 
    opened by XavierChanth 2
  • plantuml.com gives

    plantuml.com gives "Forbidden" error on dcdg output

    Hi George,

    I got this error form www.plantuml.com with some dcdg output:

    Forbidden
    
    You don't have permission to access /plantuml/uml/xLrVSzmuSd_tfs3fwRQypaFkwYgbygrE6icxa_CVdINlfl8oHP6O6Pmuu0G4nz8w_ku1-2Cez0Ya6l8uLwdAYqHsDngDxaRZ3ngSlpOcrwRTL2yQOJALRqIppGjn9RQvpasji-FZ5o-AAc-QxEWVzKxcrQBPhOwFotprBwKjUNnyLUHLVbE9-IPVYVDyTPHzUP5bhzxAnho-cdyKgXJQuN_A5dfuQIp9Ir8o-opD-htu_AiKdxUrDd_umP7iQbbcsrmgCrlBgh
    
    (plus another page of goop)
    

    Is this interesting enough to you that you'd like me to dig up a reproducible case? Or is the plantuml website not all that reliable to begin with?

    If this is of interest, I'm happy to put a more reasonable bug report together. The example that creates this is the opposite of minimal -- I just ran dcdg on about 5KLOC, did a copy-paste, got the error, then went back to umlet and digging through dartdoc output :-). But I'm happy to spend a bit of time putting together a usable bug report, if you don't mind a largeish example (34K puml file). In this case, I might hold off for a couple of days, while I do a bit of refactoring prior to making the github repo public, since maybe you'd want access to the code that created it?

    FWIW I use generics a fair bit, including generic methods. Might be totally unrelated, but maybe generic methods aren't all that commonly used in Dart?

    opened by zathras 2
  • Add separator between file and class in DOT output

    Add separator between file and class in DOT output

    DOT output is missing the separator between the Dart file name and the class name. This may have been a regression when Mermaid support was added.

    See #59 for an example.

    bug 
    opened by glesica 0
  • Enhancement: Include and exclude multiple paths

    Enhancement: Include and exclude multiple paths

    I'd like to have a way to tell dcdg to search into multiple directories and at the same time exclude multiple directories relative to the root directory. My use case is this flame engine's repo

    Directories I want to include: lib/src/components/

    Directories I want to exclude: lib/src/components/input/ lib/src/components/mixins/

    enhancement help wanted good first issue 
    opened by ufrshubham 1
  • Dot output contains the full path

    Dot output contains the full path

    Problem

    I am trying to use this package to generate dot output for some class in flame engine's repo. This is the command that I am using,

    dart pub global run dcdg -b dot > dot.dot
    

    It executes without any errors, but the output is something like this,

    "flame/src/collisions/hitboxes/circle_hitbox.dartCircleHitbox" -> "flame/src/geometry/circle_component.dartCircleComponent"
    "flame/src/collisions/hitboxes/circle_hitbox.dartCircleHitbox" -> "flame/src/collisions/hitboxes/shape_hitbox.dartShapeHitbox"
    "flame/src/collisions/hitboxes/composite_hitbox.dartCompositeHitbox" -> "flame/src/components/position_component.dartPositionComponent"
    "flame/src/collisions/hitboxes/composite_hitbox.dartCompositeHitbox" -> "flame/src/collisions/collision_callbacks.dartCollisionCallbacks"
    

    The class name and file path are getting combined into a single string and as a result of this the image generated from dot executable looks like this, image

    Expected behavior

    I'd like the dot output to be just the class names so that the generated image also contains only the class names.

    enhancement help wanted good first issue 
    opened by ufrshubham 3
  • dcdg does not work with the new analyzer >=3.0.0 - but it is required for freezed to work.

    dcdg does not work with the new analyzer >=3.0.0 - but it is required for freezed to work.

    dcdg does not work with the new analyzer >=3.0.0 - but it is required for freezed to work. And freezed is a structured package... Can this be fixed?

    Because tortuga depends on freezed ^2.0.2 which depends on analyzer >=3.0.0 <5.0.0, analyzer >=3.0.0 <5.0.0 is required. So, because tortuga depends on analyzer ^2.6.0, version solving failed. pub get failed (1; So, because tortuga depends on analyzer ^2.6.0, version solving failed.) exit code 1

    dependency 
    opened by AlexKenbo 2
  • Extensions?

    Extensions?

    I seem unable to get dcdg to represent extensions in my output.

    part of 'extensions.dart';
    
    extension intX on int {
      String toTime() {
        int h, m, s;
    
        h = this ~/ 3600;
    
        m = ((this - h * 3600)) ~/ 60;
    
        s = this - (h * 3600) - (m * 60);
    
        String hourLeft =
            h.toString().length < 2 ? "0" + h.toString() : h.toString();
    
        String minuteLeft =
            m.toString().length < 2 ? "0" + m.toString() : m.toString();
    
        String secondsLeft =
            s.toString().length < 2 ? "0" + s.toString() : s.toString();
    
        String result = "$hourLeft:$minuteLeft:$secondsLeft";
    
        return result;
      }
    }
    
    enhancement good first issue 
    opened by mingsai 1
Releases(v4.1.0)
  • v4.1.0(Sep 11, 2022)

    What's Changed

    • Implement Mermaid diagrams by @glesica in https://github.com/glesica/dcdg.dart/pull/56
    • Update for release 4.1.0 by @glesica in https://github.com/glesica/dcdg.dart/pull/58

    Full Changelog: https://github.com/glesica/dcdg.dart/compare/v4.0.1...v4.1.0

    Source code(tar.gz)
    Source code(zip)
  • v4.0.1(Jan 9, 2022)

    What's Changed

    • Avoid duplicates on parts by @glesica in https://github.com/glesica/dcdg.dart/pull/51

    Full Changelog: https://github.com/glesica/dcdg.dart/compare/v4.0.0...v4.0.1

    Source code(tar.gz)
    Source code(zip)
  • v4.0.0(Oct 21, 2021)

    Improves consistency of is-a relationships and updates dependencies.

    What's Changed

    • Tell analyzer about bin/ and web/ directories by @glesica in https://github.com/glesica/dcdg.dart/pull/42
    • Bump all the versions by @glesica in https://github.com/glesica/dcdg.dart/pull/45
    • Fix is-a include bug by @glesica in https://github.com/glesica/dcdg.dart/pull/48
    • Bump version and update docs by @glesica in https://github.com/glesica/dcdg.dart/pull/49

    Full Changelog: https://github.com/glesica/dcdg.dart/compare/v3.1.1...v4.0.0

    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(May 21, 2021)

  • v3.0.0(Mar 16, 2021)

Owner
George Lesica
I help researchers and students make better scientific software.
George Lesica
A new Flutter project. Use of Padding Class(Widget) and Card Class (Widget)

Use_Of_Card_And_Padding_Class A new Flutter project. Use of Padding Class(Widget) and Card Class (Widget) Getting Started This project is a starting p

Avinandan Bose 1 Mar 18, 2022
Dart and Flutter sealed class generator and annotations, with match methods and other utilities. There is also super_enum compatible API.

Dart Sealed Class Generator Generate sealed class hierarchy for Dart and Flutter. Features Generate sealed class with abstract super type and data sub

6thSolution 15 Jan 2, 2023
Startup-Name-Generator-App-in-Flutter - Business Startup Name Generator App in Flutter

Business Startup Name Generator App #About APP: A simple mobile app that generat

AHSAN SIDDZ 0 Jan 30, 2022
This is a Flutter app which shows how to use the PageView Class in your Flutter App

page_view_class A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Shehzaan Mansuri 1 Oct 25, 2021
A class for parsing strings using a sequence of patterns.

This package exposes a StringScanner type that makes it easy to parse a string using a series of Patterns. For example: import 'dart:math' as math; i

Dart 51 Nov 8, 2022
An enterprise-class package of Flutter components for mobile applications.

Bruno 一套企业级移动端 Flutter 组件库 简体中文 | English ✨ 特性 提炼自企业级移动端产品的交互和视觉风格 开箱即用的高质量 Flutter 组件 提供满足业务差异的主题定制能力 设计工具赋能开发全链路 Demo 下载 适配 Flutter 版本 Bruno 版本 Flut

Ke Technologies 2.2k Jan 2, 2023
package library for extended_image, extended_text and extended_text_field,provide common base class.

extended_image_library package library for extended_image extended_image A powerful official extension library of image, which support placeholder(loa

FlutterCandies 124 Dec 31, 2022
Created a mobile application for my Project Oriented class.

Projet Scarla C'est pour notre cours : Projet d'intégration avec Raouf Babari au semestre d'hiver 2021. Projet Scarla Le nom de notre projet d’intégra

null 1 Jan 4, 2022
Flutter Novel Webtoon create flutter beginner class from Dicoding

novel_app This is my final project from create flutter beginner class from Dicoding. Screenshot Getting Started This project is a starting point for a

Boltzmann 0 Mar 15, 2022
A JSON serialize class to convert 'to' and 'from' JSON format Enums, DateTime and any of your own classes.

A JSON serialize class to convert 'to' and 'from' JSON format Enums, DateTime and any of your own classes. Introduction Jsonize solves the problem of

null 2 Nov 17, 2022
An app made for CRs of the university to easily record the attendance of the class.

Attendance Report Generator This Flutter application is developed to aid in taking the attendance of the students on your phone and generate the repor

Rashid Wassan 14 Dec 6, 2022
Project task from dicoding.com intermediate Flutter class

restaurant_app_project First project task from dicoding.com Intermediate Flutter class. Run these command before build: flutter pub get flutter pub ru

Kemal Idris 3 Nov 15, 2022
An application of learning outcomes from the Mastering Flutter 2.0 class: Building Travel and Aircraft Applications Buildwithangga

Airplane An application of learning outcomes from the Mastering Flutter 2.0 class: Building Travel and Aircraft Applications Buildwithangga ?? ScreenS

Qwerty 2 Aug 29, 2022
Tinder-like class that allows dogs to pair with other dogs as play buddies and have fun(:

Paw-Tindr Tinder-like class that allows dogs to pair with other dogs as play buddies and have fun(: Setting Up Firebase Follow steps mentioned (here)[

null 3 Dec 15, 2022
Dart code generator for helping with (firebase) analytics.

analytics_events_gen An easy generator for tracking firebase analytics events via type safe methods. Add to pubspec.yaml Check pub for the latest vers

Herbert Poul 2 Nov 16, 2022
Enum extendable - Dart code generator. Generates enum extensions code.

Generates code for the extension on an enum. Overview Being able to add fields and methods to an enum. Let's say we have the following enum: enum Math

null 0 Jan 10, 2022
Simple, random string generator for Dart

Simple Random String Simple, random string generator Features Lower characters Upper characters Numbers Customizable special characters Repeatable or

Yasin TUNCEL 1 Dec 19, 2022
A generator for fhir dart classes with json artifacts.

A generator for fhir dart classes with json artifacts. Thie generator uses the freezed package to generate the data classes. It also uses all the primitive_types from the fhir package.

Joel Staubach 2 Jun 14, 2022
This is a simple Gantt chart generator written as Dart command line tool.

Gantt Chart Generator This is a simple Gantt chart generator written as Dart command line tool. Currently the tool generates an HTML/CSS Gantt chart.

John Lyon-Smith 1 Apr 26, 2022