Problem
The edge_types.dart example file references an EdgeType enum that doesn't exist in the library. The library uses EdgeTypes which is an abstract class with static const String values.
Affected File
packages/xyflow_flutter/example/lib/examples/edge_types.dart
Current Code (Broken)
EdgeType _selectedEdgeType = EdgeType.bezier; // ❌ EdgeType enum doesn't exist
Edge<Map<String, dynamic>>(
id: 'e-bezier',
source: 'source',
target: 'bezier',
type: EdgeType.bezier, // ❌ Wrong type
data: {'label': 'Bezier'},
),
Library API
The library defines EdgeTypes as:
abstract class EdgeTypes {
EdgeTypes._();
static const String defaultEdge = 'default';
static const String straight = 'straight';
static const String step = 'step';
static const String smoothStep = 'smoothStep';
static const String simpleBezier = 'simpleBezier';
}
Solution
Update edge_types.dart to use EdgeTypes (String constants) instead of EdgeType (non-existent enum):
String _selectedEdgeType = EdgeTypes.defaultEdge;
Edge<Map<String, dynamic>>(
id: 'e-bezier',
source: 'source',
target: 'bezier',
type: EdgeTypes.defaultEdge, // ✅ Use string type
data: {'label': 'Bezier'},
),
@claude please fix this issue
Problem
The
edge_types.dartexample file references anEdgeTypeenum that doesn't exist in the library. The library usesEdgeTypeswhich is an abstract class with static const String values.Affected File
packages/xyflow_flutter/example/lib/examples/edge_types.dartCurrent Code (Broken)
Library API
The library defines
EdgeTypesas:Solution
Update edge_types.dart to use
EdgeTypes(String constants) instead ofEdgeType(non-existent enum):@claude please fix this issue