Add action to pull services json

This commit is contained in:
zontreck 2024-05-15 05:05:17 -07:00
parent 56879f6c14
commit c0eef32f56
3 changed files with 31 additions and 1 deletions

View file

@ -1,6 +1,18 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:zontreck/Settings.dart';
class Constants {
static const TITLEBAR_COLOR = Color.fromARGB(255, 97, 0, 0);
static const DRAWER_COLOR = Color.fromARGB(148, 0, 97, 97);
static const SERVICES_JSON =
"https://raw.githubusercontent.com/AriasCreations/AriasCreations/main/services.json";
static Future<Map<String, dynamic>> pullServicesJson() async {
Settings settings = Settings();
var reply = await settings.dio.get(SERVICES_JSON);
return json.decode(reply.data);
}
}