imsujan276 / shopify_flutter

A flutter package that works as a bridge between your Shopify Store and Flutter Application
https://pub.dev/packages/shopify_flutter
MIT License
26 stars 27 forks source link

Added `ShopifyLocalization` #71

Closed asadamatic closed 4 months ago

asadamatic commented 5 months ago

Purpose

This will allow to fetch Loaclization object, which will be beneficial to present Language and Currency options to the user.

imsujan276 commented 4 months ago

Thank you @asadamatic for this update. It would be best if you could add an example and updated the readme file too so that the devs can know when and how to use this feature

asadamatic commented 4 months ago

@imsujan276 Sure, I'll add those in the next commit.

asadamatic commented 4 months ago

@imsujan276 I'm added the documentation and example. The example is in the shop tab.

imsujan276 commented 4 months ago

Hi, thank you for your time for updating the doc.

But, in the example, I am unable to understand how the fetched data can be used in the app. like

  1. is it used to fetch localized data from the shopify? If yes, how can one use it ?
  2. is it used to just display the supported countries?
asadamatic commented 4 months ago

It is used to fetch;

  1. Supported languages, which can be used to display language options to the user.
  2. Supported countries and their supported currencies, which can be used to display currency options to the user.

Without this data, the developer would need to hardcode the supported languages and currencies.