mobile bluesky app made with flutter
lazurite.stormlightlabs.org/
mobile
bluesky
flutter
1part of 'compose_bloc.dart';
2
3abstract class ComposeEvent extends Equatable {
4 const ComposeEvent();
5
6 @override
7 List<Object?> get props => [];
8}
9
10class TextChanged extends ComposeEvent {
11 const TextChanged(this.text);
12
13 final String text;
14
15 @override
16 List<Object?> get props => [text];
17}
18
19class MediaAttached extends ComposeEvent {
20 const MediaAttached(this.path, {this.width, this.height});
21
22 final String path;
23 final int? width;
24 final int? height;
25
26 @override
27 List<Object?> get props => [path, width, height];
28}
29
30class MediaRemoved extends ComposeEvent {
31 const MediaRemoved(this.index);
32
33 final int index;
34
35 @override
36 List<Object?> get props => [index];
37}
38
39class AltTextUpdated extends ComposeEvent {
40 const AltTextUpdated({required this.index, required this.altText});
41
42 final int index;
43 final String altText;
44
45 @override
46 List<Object?> get props => [index, altText];
47}
48
49class DraftSaved extends ComposeEvent {
50 const DraftSaved();
51}
52
53class DraftLoaded extends ComposeEvent {
54 const DraftLoaded(this.draftId);
55
56 final int draftId;
57
58 @override
59 List<Object?> get props => [draftId];
60}
61
62class DraftsRequested extends ComposeEvent {
63 const DraftsRequested();
64}
65
66class DraftDeleted extends ComposeEvent {
67 const DraftDeleted(this.draftId);
68
69 final int draftId;
70
71 @override
72 List<Object?> get props => [draftId];
73}
74
75class PostScheduled extends ComposeEvent {
76 const PostScheduled(this.scheduledAt);
77
78 final DateTime scheduledAt;
79
80 @override
81 List<Object?> get props => [scheduledAt];
82}
83
84class ScheduleCleared extends ComposeEvent {
85 const ScheduleCleared();
86}
87
88class VideoAttached extends ComposeEvent {
89 const VideoAttached(this.path);
90
91 final String path;
92
93 @override
94 List<Object?> get props => [path];
95}
96
97class VideoRemoved extends ComposeEvent {
98 const VideoRemoved();
99}
100
101class VideoAltTextUpdated extends ComposeEvent {
102 const VideoAltTextUpdated(this.altText);
103
104 final String altText;
105
106 @override
107 List<Object?> get props => [altText];
108}
109
110class PostSubmitted extends ComposeEvent {
111 const PostSubmitted({this.suppressedLinkUri});
112
113 final String? suppressedLinkUri;
114
115 @override
116 List<Object?> get props => [suppressedLinkUri];
117}
118
119class ReplyContextSet extends ComposeEvent {
120 const ReplyContextSet({
121 required this.parentUri,
122 required this.parentCid,
123 required this.rootUri,
124 required this.rootCid,
125 });
126
127 final String parentUri;
128 final String parentCid;
129 final String rootUri;
130 final String rootCid;
131
132 @override
133 List<Object?> get props => [parentUri, parentCid, rootUri, rootCid];
134}
135
136class ReplyContextCleared extends ComposeEvent {
137 const ReplyContextCleared();
138}
139
140class QuoteContextSet extends ComposeEvent {
141 const QuoteContextSet({required this.quoteUri, required this.quoteCid});
142
143 final String quoteUri;
144 final String quoteCid;
145
146 @override
147 List<Object?> get props => [quoteUri, quoteCid];
148}
149
150class QuoteContextCleared extends ComposeEvent {
151 const QuoteContextCleared();
152}
153
154class EditContextSet extends ComposeEvent {
155 const EditContextSet({required this.postUri, required this.postCid, required this.record, this.initialText});
156
157 final String postUri;
158 final String postCid;
159 final Map<String, dynamic> record;
160 final String? initialText;
161
162 @override
163 List<Object?> get props => [postUri, postCid, record, initialText];
164}