Logic Module for util functions like cross-platform downloaders and functions to retrieve remote info.
dependencies:
xapptor_logic: ^0.0.3
flutter pub get
FileDownloader.save(
base64_string: pdf_bytes,
file_name: file_name,
);
bool payments_are_enabled = await check_if_payments_are_enabled();
bool user_is_admin = await check_if_user_is_admin(user_id);
create_coupons(times, base_id);
update_field_value_in_collection(field, value, collection);
update_field_name_in_collection(collection, old_field, new_field);
update_field_name_in_document(collection, document, document_id, old_field, new_field);
update_item_value_in_array(document_id, collection_id, field_key, field_value, index);
duplicate_document(document_id, collection_id, times, base_id, apply_random_number);
duplicate_item_in_array(document_id, collection_id, field_key, index, times, callback);
delete_field_in_collection(field, collection);
delete_corrupted_accounts();
delete_corrupted_certificates();
check_if_coupon_is_valid(
coupon_id,
context,
valid_message,
invalid_message,
);
get_html_certificate(
course_name,
user_name,
date,
id,
);
check_if_exist_certificate(
course_id,
context,
show_has_certificate,
);
save_certificate(
user,
user_info,
course_id,
has_certificate,
show_has_certificate,
context,
);
check_if_course_was_completed(
course_id,
user_info,
context,
);
get_main_color_from_image(image);
get_main_color_from_remote_image(url);
get_main_color_from_remote_svg(url);
get_remote_image(url);
get_remote_svg(url);
is_portrait(context);
random_number_with_range(min, max);
request_position();
get_address_from_position();
send_email(
to,
subject,
text,
html,
);
timestamp_to_date(time_stamp);