Skip to content

Commit

Permalink
fix docs comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Arokip committed Apr 18, 2021
1 parent b7941a0 commit 7043f84
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

# 0.0.8

* Add some more documentation comments.
* Fix documentation comments.

# 0.0.7

* Add more documentation comments.
Expand Down
1 change: 1 addition & 0 deletions lib/src/canvas_context/model/component_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class ComponentData with ChangeNotifier {
/// Dynamic data for you to define your own data for this component.
final dynamic data;

/// Represents data of a component in the model.
ComponentData({
this.id,
this.position = Offset.zero,
Expand Down
5 changes: 3 additions & 2 deletions lib/src/canvas_context/model/connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ abstract class Connection {
/// Id of a component to which is the component connected.
final String otherComponentId;

/// Abstract class that represents connection of a component.
Connection({
@required this.connectionId,
@required this.otherComponentId,
Expand All @@ -17,8 +18,8 @@ abstract class Connection {
}
}

/// Connection type that is saved to source component [connection].
class ConnectionOut extends Connection {
/// Connection type that is saved to source component [connection].
ConnectionOut({
@required connectionId,
@required otherComponentId,
Expand All @@ -28,8 +29,8 @@ class ConnectionOut extends Connection {
);
}

/// Connection type that is saved to target component [connection].
class ConnectionIn extends Connection {
/// Connection type that is saved to target component [connection].
ConnectionIn({
@required connectionId,
@required otherComponentId,
Expand Down
1 change: 1 addition & 0 deletions lib/src/canvas_context/model/link_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class LinkData with ChangeNotifier {
/// Dynamic data for you to define your own data for this link.
dynamic data;

/// Represents data of a link/connection in the model.
LinkData({
this.id,
this.sourceComponentId,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/link_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ enum LineType {
dotted,
}

/// Defines a visual design of a link on the canvas.
class LinkStyle {
/// Defines the design of the link's line.
///
Expand Down Expand Up @@ -46,6 +45,7 @@ class LinkStyle {
/// Defines the color of the link's line and both arrowheads.
Color color;

/// Defines a visual design of a link on the canvas.
LinkStyle({
this.lineType = LineType.solid,
this.arrowType = ArrowType.none,
Expand Down
3 changes: 3 additions & 0 deletions lib/src/utils/painter/grid_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class GridPainter extends CustomPainter {
final bool isAntiAlias;
final bool matchParentSize;

/// Paints a grid.
///
/// Useful if added as canvas background widget.
GridPainter({
this.lineWidth = 1.0,
this.lineColor = Colors.black,
Expand Down
3 changes: 3 additions & 0 deletions lib/src/utils/painter/rect_highlight_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class ComponentHighlightPainter extends CustomPainter {
final double dashWidth;
final double dashSpace;

/// Rectangular dashed line painter.
///
/// Useful if added as component widget to highlight it.
ComponentHighlightPainter({
@required this.width,
@required this.height,
Expand Down
2 changes: 2 additions & 0 deletions lib/src/utils/vector_utils.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

/// Simple class with static methods for computing basic vector operation.
/// It uses Offset as 2D vector.
class VectorUtils {
static Offset getDirectionVector(Offset point1, Offset point2) {
return point2 - point1;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: diagram_editor
description: A flutter diagram editor library that provides DiagramEditor widget and a possibility to customize all editor design and behavior.
version: 0.0.7
version: 0.0.8
homepage: https://github.com/Arokip/fdl

environment:
Expand Down

0 comments on commit 7043f84

Please sign in to comment.