Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-31 13:10:09 +08:00
parent dbc7bcd0dd
commit 8964197b73
68 changed files with 560 additions and 293 deletions

View File

@@ -20,20 +20,22 @@ import 'package:flutter/gestures.dart' show TapGestureRecognizer;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart' show BoxHitTestEntry;
@immutable
sealed class BaseSegment {
final double start;
final double end;
BaseSegment({
const BaseSegment({
required this.start,
required this.end,
});
}
@immutable
class Segment extends BaseSegment {
final Color color;
Segment({
const Segment({
required super.start,
required super.end,
required this.color,
@@ -54,13 +56,14 @@ class Segment extends BaseSegment {
int get hashCode => Object.hash(start, end, color);
}
@immutable
class ViewPointSegment extends BaseSegment {
final String? title;
final String? url;
final int? from;
final int? to;
ViewPointSegment({
const ViewPointSegment({
required super.start,
required super.end,
this.title,