20 lines
477 B
Dart
20 lines
477 B
Dart
import "dart:io";
|
|
|
|
import "package:http/http.dart";
|
|
|
|
void main(List<String> args) async {
|
|
print("Downloading emoji list...");
|
|
|
|
final response = await get(
|
|
.https("github.com", "github/gemoji/raw/refs/heads/master/db/emoji.json"),
|
|
);
|
|
|
|
if (response.statusCode != 200) {
|
|
throw Exception("Failed to load emoji data");
|
|
}
|
|
|
|
await File.fromUri(Platform.script.resolve("../assets/emoji.json"))
|
|
.writeAsString(response.body);
|
|
|
|
print("Emoji list written!");
|
|
}
|