general_lib library

Functions

convertToAgo(int? timestamp) String
convertToAgoFromDateTime(DateTime dateTime) String
createOffset({required int totalCount, required int limitCount}) → (List<int>, int)
fetch(String url, {FetchOption? options, Encoding? encoding}) Future<Response>
generate_add_sql_data({required String tableName, required Map data}) String
generateDataSqlJson({required Map data}) String
generateUuid(int length, {String text = "0123456789abcdefghijklmnopqrstuvwxyz"}) String
getDeviceId({bool isGetProductId = false}) DeviceId?
getRandomElement<T>(List<T> list) → T
getUuid(int length, {String? text}) String
getRandom uuid for parameters @extra
jsonEach({required Map data, required Future builder(dynamic key, dynamic value, bool isList, bool isMapInList)}) Future<Map>
jsonListEach({required String key, required List data, required Future builder(dynamic key, dynamic value, bool isList, bool isMapInList)}) Future<List>
jsonToIsar(Map<String, dynamic> data, {String className = "Root", bool isMain = true, bool isUseClassName = false, String? comment, int isarVersion = 3}) JsonDataScript
jsonToIsarDynamic(Map<String, dynamic> data, {String className = "Root", bool isMain = true, bool isUseClassName = false, String? comment, required int isarVersion}) String
jsonToLanguageScript({required Map language_raw, required String default_language_code_id, required Directory directory, required Future<String?> onData(String origin_data, String language_code_id, String default_language_code_id), bool is_translate = true}) Future<Directory>
jsonToMessage(Map data, {bool isHtml = false, required Map jsonFullMedia, bool isRoot = true, String space = ""}) String
jsonToScripts(List<Map> scripts_origin, {String? comment, bool isMethodApi = true, required Directory directory, String path_package_json_dart = "import \"package:general_lib/general_lib.dart\";", int try_loop = 2}) Future<Directory>
jsonToScriptStatic(Map<String, dynamic> data, {bool isMethodApi = true, String? comment, required Directory directory, String path_package_json_dart = "import \"package:general_lib/general_lib.dart\";"}) String
jsonToSqlSupabase({required Map jsonData, Map? originData, bool isEnableRls = true, String? tableName}) String
jsonUpdate({required Map data, required Map newData}) Map
languageMapToStringScript({required String key_name, required Map data, required String language_parameter, bool is_translate = true, required String default_language_code_id, required String base_name, required Future<String?> onData(String origin_data, String language_code_id, String default_language_code_id), required FutureOr<void> onLanguageData(String languageData)}) Future<String>
textToFunctionDart({required String key, required dynamic value, required String returnType, required String className, bool isClass = false, bool isList = false, String? comment, required void paramFunction(String text), required void paramJson(String text)}) String
textToFunctionIsar({required String key, required dynamic value, required String returnType, required String className, bool isClass = false, bool isList = false, bool isUseClassName = false, String? comment, required void callback(String text), required void paramFunction(String text), required void paramJson(String text), required void operatorData(String text)}) String
textToListFunction({required String key, required String returnType, required String className, bool isClass = false, bool isList = false, String? comment, required void paramFunction(String text), required void paramJson(String text)}) String

Typedefs

ExecuteOnErrorDart<V> = FutureOr<V> Function(Object error, StackTrace stackTrace)