@@ -2,46 +2,20 @@ import 'package:lunasea/core.dart';
2
2
import 'package:lunasea/extensions/string_links.dart' ;
3
3
4
4
enum LunaLinks {
5
- BUILDS ,
6
- CHANGELOG ,
7
- DISCORD ,
8
- DOCUMENTATION ,
9
- FEEDBACK_BOARD ,
10
- GITHUB ,
11
- NOTIFICATIONS_GETTING_STARTED ,
12
- REDDIT ,
13
- BUILD_CHANNELS ,
14
- WEBLATE ,
15
- WEBSITE ,
16
- }
5
+ CHANGELOG ('https://www.lunasea.app/changelog' ),
6
+ BUILD_CHANNELS ('https://www.lunasea.app/build-channels' ),
7
+ BUILDS ('https://www.lunasea.app/builds' ),
8
+ DISCORD ('https://www.lunasea.app/discord' ),
9
+ DOCUMENTATION ('https://www.lunasea.app/docs' ),
10
+ FEEDBACK_BOARD ('https://www.lunasea.app/feedback' ),
11
+ GITHUB ('https://www.lunasea.app/github' ),
12
+ NOTIFICATIONS_DOC ('https://docs.lunasea.app/lunasea/notifications' ),
13
+ REDDIT ('https://www.lunasea.app/reddit' ),
14
+ WEBLATE ('https:/www.lunasea.app/translate' ),
15
+ WEBSITE ('https://www.lunasea.app' );
17
16
18
- extension LunaLinksExtension on LunaLinks {
19
- String get url {
20
- switch (this ) {
21
- case LunaLinks .BUILDS :
22
- return 'https://www.lunasea.app/builds' ;
23
- case LunaLinks .CHANGELOG :
24
- return 'https://www.lunasea.app/changelog' ;
25
- case LunaLinks .DISCORD :
26
- return 'https://www.lunasea.app/discord' ;
27
- case LunaLinks .DOCUMENTATION :
28
- return 'https://www.lunasea.app/docs' ;
29
- case LunaLinks .FEEDBACK_BOARD :
30
- return 'https://www.lunasea.app/feedback' ;
31
- case LunaLinks .GITHUB :
32
- return 'https://www.lunasea.app/github' ;
33
- case LunaLinks .REDDIT :
34
- return 'https://www.lunasea.app/reddit' ;
35
- case LunaLinks .BUILD_CHANNELS :
36
- return 'https://www.lunasea.app/build-channels' ;
37
- case LunaLinks .WEBLATE :
38
- return 'https:/www.lunasea.app/translate' ;
39
- case LunaLinks .WEBSITE :
40
- return 'https://www.lunasea.app' ;
41
- case LunaLinks .NOTIFICATIONS_GETTING_STARTED :
42
- return 'https://docs.lunasea.app/lunasea/notifications' ;
43
- }
44
- }
17
+ final String url;
18
+ const LunaLinks (this .url);
45
19
46
- Future <void > launch () async => this . url.openLink ();
20
+ Future <void > launch () async => url.openLink ();
47
21
}
0 commit comments