mirror of
https://github.com/dancojocaru2000/logic-circuits-simulator.git
synced 2025-02-23 01:29:36 +02:00
For now just the code, without UI that shows the simulation. However, the code works. Also added ground work for visual designer.
26 lines
809 B
Dart
26 lines
809 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'component.freezed.dart';
|
|
part 'component.g.dart';
|
|
|
|
@freezed
|
|
class ComponentEntry with _$ComponentEntry {
|
|
const factory ComponentEntry({
|
|
required String componentId,
|
|
required String componentName,
|
|
@JsonKey(includeIfNull: false)
|
|
String? componentDescription,
|
|
required List<String> inputs,
|
|
required List<String> outputs,
|
|
@JsonKey(includeIfNull: false)
|
|
List<String>? truthTable,
|
|
@JsonKey(includeIfNull: false)
|
|
List<String>? logicExpression,
|
|
@JsonKey(defaultValue: false)
|
|
required bool visualDesigned,
|
|
@JsonKey(defaultValue: [])
|
|
required List<String> dependencies,
|
|
}) = _ComponentEntry;
|
|
|
|
factory ComponentEntry.fromJson(Map<String, Object?> json) => _$ComponentEntryFromJson(json);
|
|
}
|