Repository navigation
Expand file tree
/
Copy pathicons.dart
More file actions
166 lines (122 loc) · 6.08 KB
/
Copy pathicons.dart
File metadata and controls
166 lines (122 loc) · 6.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
import 'package:flutter/widgets.dart';
import '../api/model/model.dart';
// ignore_for_file: constant_identifier_names
/// Identifiers for Zulip's custom icons.
///
/// Use these with the [Icon] widget, in the same way as one uses
/// the members of the [Icons] class from Flutter's Material library.
abstract final class ZulipIcons {
// Generated code; do not edit.
//
// To add a new icon, or otherwise edit the set of icons:
//
// * Add an SVG file in `assets/icons/`,
// or otherwise edit the SVG files there.
// The files' names (before ".svg") should be valid Dart identifiers.
//
// * Then run the command `tools/icons/build-icon-font`.
// That will update this file and the generated icon font,
// `assets/icons/ZulipIcons.ttf`.
//
// BEGIN GENERATED ICON DATA
/// The Zulip custom icon "arrow_down".
static const IconData arrow_down = IconData(0xf101, fontFamily: "Zulip Icons");
/// The Zulip custom icon "arrow_right".
static const IconData arrow_right = IconData(0xf102, fontFamily: "Zulip Icons");
/// The Zulip custom icon "at_sign".
static const IconData at_sign = IconData(0xf103, fontFamily: "Zulip Icons");
/// The Zulip custom icon "attach_file".
static const IconData attach_file = IconData(0xf104, fontFamily: "Zulip Icons");
/// The Zulip custom icon "bot".
static const IconData bot = IconData(0xf105, fontFamily: "Zulip Icons");
/// The Zulip custom icon "camera".
static const IconData camera = IconData(0xf106, fontFamily: "Zulip Icons");
/// The Zulip custom icon "chevron_right".
static const IconData chevron_right = IconData(0xf107, fontFamily: "Zulip Icons");
/// The Zulip custom icon "clock".
static const IconData clock = IconData(0xf108, fontFamily: "Zulip Icons");
/// The Zulip custom icon "contacts".
static const IconData contacts = IconData(0xf109, fontFamily: "Zulip Icons");
/// The Zulip custom icon "copy".
static const IconData copy = IconData(0xf10a, fontFamily: "Zulip Icons");
/// The Zulip custom icon "follow".
static const IconData follow = IconData(0xf10b, fontFamily: "Zulip Icons");
/// The Zulip custom icon "format_quote".
static const IconData format_quote = IconData(0xf10c, fontFamily: "Zulip Icons");
/// The Zulip custom icon "globe".
static const IconData globe = IconData(0xf10d, fontFamily: "Zulip Icons");
/// The Zulip custom icon "group_dm".
static const IconData group_dm = IconData(0xf10e, fontFamily: "Zulip Icons");
/// The Zulip custom icon "hash_italic".
static const IconData hash_italic = IconData(0xf10f, fontFamily: "Zulip Icons");
/// The Zulip custom icon "hash_sign".
static const IconData hash_sign = IconData(0xf110, fontFamily: "Zulip Icons");
/// The Zulip custom icon "image".
static const IconData image = IconData(0xf111, fontFamily: "Zulip Icons");
/// The Zulip custom icon "inbox".
static const IconData inbox = IconData(0xf113, fontFamily: "Zulip Icons");
/// The Zulip custom icon "inbox_done".
static const IconData inbox_done = IconData(0xf114, fontFamily: "Zulip Icons");
/// The Zulip custom icon "info".
static const IconData info = IconData(0xf115, fontFamily: "Zulip Icons");
/// The Zulip custom icon "inherit".
static const IconData inherit = IconData(0xf116, fontFamily: "Zulip Icons");
/// The Zulip custom icon "language".
static const IconData language = IconData(0xf117, fontFamily: "Zulip Icons");
/// The Zulip custom icon "lock".
static const IconData lock = IconData(0xf118, fontFamily: "Zulip Icons");
/// The Zulip custom icon "menu".
static const IconData menu = IconData(0xf119, fontFamily: "Zulip Icons");
/// The Zulip custom icon "message_feed".
static const IconData message_feed = IconData(0xf11a, fontFamily: "Zulip Icons");
/// The Zulip custom icon "mute".
static const IconData mute = IconData(0xf11b, fontFamily: "Zulip Icons");
/// The Zulip custom icon "read_receipts".
static const IconData read_receipts = IconData(0xf11c, fontFamily: "Zulip Icons");
/// The Zulip custom icon "send".
static const IconData send = IconData(0xf11d, fontFamily: "Zulip Icons");
/// The Zulip custom icon "share".
static const IconData share = IconData(0xf11e, fontFamily: "Zulip Icons");
/// The Zulip custom icon "share_ios".
static const IconData share_ios = IconData(0xf11f, fontFamily: "Zulip Icons");
/// The Zulip custom icon "smile".
static const IconData smile = IconData(0xf120, fontFamily: "Zulip Icons");
/// The Zulip custom icon "star".
static const IconData star = IconData(0xf121, fontFamily: "Zulip Icons");
/// The Zulip custom icon "star_filled".
static const IconData star_filled = IconData(0xf122, fontFamily: "Zulip Icons");
/// The Zulip custom icon "topic".
static const IconData topic = IconData(0xf123, fontFamily: "Zulip Icons");
/// The Zulip custom icon "unmute".
static const IconData unmute = IconData(0xf124, fontFamily: "Zulip Icons");
/// The Zulip custom icon "user".
static const IconData user = IconData(0xf125, fontFamily: "Zulip Icons");
// END GENERATED ICON DATA
}
IconData iconDataForStream(ZulipStream stream) {
// TODO: these icons aren't quite right yet;
// see this message and the one after it:
// https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20.23F117.20.22Inbox.22.20screen/near/1680637
return switch(stream) {
ZulipStream(isWebPublic: true) => ZulipIcons.globe,
ZulipStream(inviteOnly: true) => ZulipIcons.lock,
ZulipStream() => ZulipIcons.hash_sign,
};
}
IconData? iconDataForTopicVisibilityPolicy(UserTopicVisibilityPolicy policy) {
switch (policy) {
case UserTopicVisibilityPolicy.muted:
return ZulipIcons.mute;
case UserTopicVisibilityPolicy.unmuted:
return ZulipIcons.unmute;
case UserTopicVisibilityPolicy.followed:
return ZulipIcons.follow;
case UserTopicVisibilityPolicy.none:
return null;
case UserTopicVisibilityPolicy.unknown:
// This case is unreachable (or should be) because we keep `unknown` out
// of our data structures. We plan to remove the `unknown` case in #1074.
assert(false);
return null;
}
}