refactoring
This commit is contained in:
@@ -4,26 +4,10 @@ import 'package:fast_equatable/fast_equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:lensai/features/bangs/data/database/database.dart'
|
||||
show BangCompanion;
|
||||
import 'package:lensai/features/bangs/data/models/bang_group.dart';
|
||||
|
||||
part 'bang.g.dart';
|
||||
|
||||
enum BangGroup {
|
||||
general('https://raw.githubusercontent.com/FaFre/bangs/main/data/bangs.json'),
|
||||
assistant(
|
||||
'https://raw.githubusercontent.com/FaFre/bangs/main/data/assistant_bangs.json',
|
||||
),
|
||||
kagi(
|
||||
'https://raw.githubusercontent.com/FaFre/bangs/main/data/kagi_bangs.json',
|
||||
),
|
||||
custom(
|
||||
'https://raw.githubusercontent.com/FaFre/bangs/refs/heads/custom/data/custom.json',
|
||||
);
|
||||
|
||||
final String url;
|
||||
|
||||
const BangGroup(this.url);
|
||||
}
|
||||
|
||||
enum BangFormat {
|
||||
///When the bang is invoked with no query, opens the base path of the URL (/)
|
||||
///instead of any path given in the template (g., /search)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
enum BangGroup {
|
||||
general('https://raw.githubusercontent.com/FaFre/bangs/main/data/bangs.json'),
|
||||
assistant(
|
||||
'https://raw.githubusercontent.com/FaFre/bangs/main/data/assistant_bangs.json',
|
||||
),
|
||||
kagi(
|
||||
'https://raw.githubusercontent.com/FaFre/bangs/main/data/kagi_bangs.json',
|
||||
),
|
||||
custom(
|
||||
'https://raw.githubusercontent.com/FaFre/bangs/refs/heads/custom/data/custom.json',
|
||||
);
|
||||
|
||||
final String url;
|
||||
|
||||
const BangGroup(this.url);
|
||||
}
|
||||
Reference in New Issue
Block a user