import 'dart:convert';

import 'package:shared_preferences/shared_preferences.dart';

class Logs{
  static save(String log){
    SharedPreferences.getInstance().then((_prefs) async{
        var jsonString = _prefs.getString("LOG") ?? "[]";
        var list = json.decode(jsonString) as List;
        list.add("Running... ${DateTime.now()}");
        _prefs.setString("LOG", json.encode(list));
    });
  }
}