xapptor_logic

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

xapptor logic

Xapptor Logic #

Logic Module for util functions like cross-platform downloaders and functions to retrieve remote info. #
Let's get started #
1 - Depend on it #
Add it to your package's pubspec.yaml file
dependencies:
xapptor_logic: ^0.0.3
copied to clipboard
2 - Install it #
Install packages from the command line
flutter pub get
copied to clipboard
3 - Learn it like a charm #
File Downloader (Call Share in Mobile) #
FileDownloader.save(
base64_string: pdf_base64,
file_name: file_name,
);
copied to clipboard
Check if payments are enabled (Firestore) #
Collection: metadata
Document: payments
Field: enabled
Check: for each platform inside "enabled" (android/ios/web)
bool payments_are_enabled = await check_if_payments_are_enabled();
copied to clipboard
Check if user is admin (Firestore) #
Collection: users
Document: user_id
Field: admin
bool user_is_admin = await check_if_user_is_admin(user_id);
copied to clipboard
Firebase Tasks #
CREATE #
Coupons #
Collection: coupons
create_coupons(times, base_id);
copied to clipboard
UPDATE #
Field Value in Collection #
update_field_value_in_collection(field, value, collection);
copied to clipboard
Field Name in Collection #
update_field_name_in_collection(collection, old_field, new_field);
copied to clipboard
Field Name in Document #
update_field_name_in_document(collection, document, document_id, old_field, new_field);
copied to clipboard
Item Value in Array #
update_item_value_in_array(document_id, collection_id, field_key, field_value, index);
copied to clipboard
DUPLICATE #
Document #
duplicate_document(document_id, collection_id, times, base_id, apply_random_number);
copied to clipboard
Item in Array #
duplicate_item_in_array(document_id, collection_id, field_key, index, times, callback);
copied to clipboard
DELETE #
Field in Collection #
delete_field_in_collection(field, collection);
copied to clipboard
Corrupted Accounts #
Delete accounts that don't have gender, birthday, and country field
delete_corrupted_accounts();
copied to clipboard
Corrupted Certificates #
Delete certificates that don't have a user_id registered
delete_corrupted_certificates();
copied to clipboard
CHECK #
If coupon is valid
check_if_coupon_is_valid(
coupon_id,
context,
valid_message,
invalid_message,
);
copied to clipboard
Certificates #
Get html certificate
get_html_certificate(
course_name,
user_name,
date,
id,
);
copied to clipboard
Check if exist certificate
check_if_exist_certificate(
course_id,
context,
show_has_certificate,
);
copied to clipboard
Save certificate
save_certificate(
user,
user_info,
course_id,
has_certificate,
show_has_certificate,
context,
);
copied to clipboard
Check if course was completed
check_if_course_was_completed(
course_id,
user_info,
context,
);
copied to clipboard
Get main color from image
get_main_color_from_image(image);
copied to clipboard
Get main color from remote image
get_main_color_from_remote_image(url);
copied to clipboard
Get main color from remote SVG
get_main_color_from_remote_svg(url);
copied to clipboard
Get remote image
get_remote_image(url);
copied to clipboard
Get remote SVG
get_remote_svg(url);
copied to clipboard
Check if is portrait mode
is_portrait(context);
copied to clipboard
Random number between a range
random_number_with_range(min, max);
copied to clipboard
Request position
request_position();
copied to clipboard
Get address from position
get_address_from_position();
copied to clipboard
Send Email
send_email(
to,
subject,
text,
html,
);
copied to clipboard
Convert timestamp to date
timestamp_to_date(time_stamp);
copied to clipboard
4 - Check Abeinstitute Repo for more examples #
Abeinstitute Repo
Abeinstitute

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.