905086
2026-11-07 0b4478cf6c0eb509c95a9bec2cc7bda37b259e10
fluttergamebox/lib/api/api_service.dart
@@ -118,6 +118,7 @@
  final String cover;
  final String description;
  final String fileUrl;
  final String launchExe;
  Tool({
    required this.id,
    required this.name,
@@ -125,6 +126,7 @@
    required this.cover,
    required this.description,
    required this.fileUrl,
    this.launchExe = '',
  });
  factory Tool.fromJson(Map<String, dynamic> j) => Tool(
        id: j['id'],
@@ -133,6 +135,7 @@
        cover: j['cover'] ?? '',
        description: j['description'] ?? '',
        fileUrl: j['file_url'] ?? '',
        launchExe: j['launch_exe'] ?? '',
      );
}
@@ -190,6 +193,9 @@
    return (res['data'] as List).map((e) => Tool.fromJson(e)).toList();
  }
  static Future<Map<String, dynamic>> toolDownloadInfo(int toolId) async =>
      await ApiClient.get('/api/tools/$toolId/download');
  static Future<String> announcements() async {
    final res = await ApiClient.get('/api/announcements');
    if (res['code'] != 0) return '';