Skip to content

Analyze API and network layer (@explore subagent)

Field Value
Source opencode CLI/web
Session ses_fa89434baffe9d0oH4fGHNI79W
Started 2026-08-31 10:44
Messages 12
Parts 101 (text+patch+tool) · 7 reasoning · 60 tool calls
Model opencode:big-pickle
Directory /home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App

In the Flutter app at /home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App, thoroughly analyze:

  1. The HTTP client setup (Dio, http, retrofit, etc.)
  2. API base URL configuration and environment setup
  3. All API endpoints and how they’re organized
  4. Request/response interceptors
  5. Authentication token handling
  6. Error handling patterns
  7. API models / data classes
  8. Any caching strategy

Search in lib/ for files related to API, network, http, dio, repository, services, models. Read key files and provide a complete picture of the networking layer.

I’ll conduct a thorough analysis of the networking layer. Let me start with broad searches across multiple dimensions.

glob — {"pattern": "lib/**/*api*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/api_client.dart

glob — {"pattern": "lib/**/*http*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

No files found

glob — {"pattern": "lib/**/*dio*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/radio_button_group.dart

glob — {"pattern": "lib/**/*network*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

No files found

glob — {"pattern": "lib/**/*repository*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/wishList/bloc/wishlist_repository.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/sign_up/bloc/sign_up_repository.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/add_edit_address/bloc/add_edit_address_repository.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/filter_screen/bloc/filter_repository.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/sign_in/bloc/sign_in_repository.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flut
…[truncated]

glob — {"pattern": "lib/**/*service*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/home_page/widget/service_content.dart

glob — {"pattern": "lib/**/*model*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/sign_up_model/signup_model.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/sign_in_model/signin_model.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/review_model/review_model.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/product_model/product_screen_model.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/order_model/shipment_model.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/order
…[truncated]

glob — {"pattern": "lib/**/*intercept*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

No files found

glob — {"pattern": "lib/**/*client*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/api_client.dart

glob — {"pattern": "lib/**/*base_url*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

No files found

glob — {"pattern": "lib/**/*config*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/server_configuration.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/core_configs_model.dart

glob — {"pattern": "lib/**/*endpoint*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

No files found

glob — {"pattern": "lib/**/*cache*", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App"}

No files found

Let me now read the core networking files and explore the structure more deeply.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/api_client.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/api_client.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'dart:developer';
12: import 'dart:io';
13:
14: import 'package:bagisto_app_demo/data_model/account_models/account_update_model.dart';
15: import 'package:bagisto_app_demo/data_model/gdpr_models/gdpr_pdf_model.dart';
16: import
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/server_configuration.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/server_configuration.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: // Application Specific Constants
12: import 'dart:ui';
13:
14: const int defaultSplashDelay = 3;
15:
16: const String baseDomain = "";
17:
18: ///base url for the application
19: const String baseUrl = "$baseDomain/graphql";
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/graphql_base_model.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/graphql_base_model.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: // file_names, constant_identifier_names
12: import 'package:json_annotation/json_annotation.dart';
13:
14: part 'graphql_base_model.g.dart';
15:
16: /// BaseModel class having some general variables which will use by other
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/graphql_base_error_model.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/graphql_base_error_model.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:json_annotation/json_annotation.dart';
12:
13: part 'graphql_base_error_model.g.dart';
14:
15: @JsonSerializable()
16: class GraphQlBaseErrorModel {
17: String? success;
18: bool? responseStatus;
19:
2
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/core_configs_model.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/core_configs_model.dart</path>
<type>file</type>
<content>
1:
2: import 'package:json_annotation/json_annotation.dart';
3: import '../screens/home_page/data_model/new_product_data.dart';
4:
5: part 'core_configs_model.g.dart';
6:
7: @JsonSerializable()
8: class CoreConfigsModel {
9: CoreConfigs? coreConfigs;
10:
11: CoreConfigsModel({
12: this.coreConfigs,
13: });
14:
15: factory CoreConfigsModel.fromJson(Map<String, dynamic> json) => _$CoreConfigsModelFromJson(json);
16:
17: Map<String, dynamic> toJson() => _$CoreConfigsModelToJson(this);
18: }
19:
20: @JsonSerializable()
21: class CoreConfi
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services</path>
<type>directory</type>
<entries>
api_client.dart
graph_ql.dart
mutation_query.dart
(3 entries)
</entries>

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model</path>
<type>directory</type>
<entries>
account_models/
add_to_wishlist_model/
app_route_arguments.dart
categories_data_model/
core_configs_model.dart
currency_language_model.dart
gdpr_models/
google_place_model.dart
graphql_base_error_model.dart
graphql_base_model.dart
order_model/
product_model/
review_model/
sign_in_model/
sign_up_model/
(15 entries)
</entries>

Now let me read the GraphQL client setup, mutation/query definitions, and some key repositories.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/graph_ql.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/graph_ql.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'dart:developer';
12:
13: import 'package:graphql_flutter/graphql_flutter.dart';
14:
15: import '../utils/app_global_data.dart';
16: import '../utils/server_configuration.dart';
17: import '../utils/shared_preference_helper.dart'
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/mutation_query.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/mutation_query.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'dart:convert';
12:
13: import 'package:bagisto_app_demo/screens/cart_screen/utils/cart_index.dart';
14:
15: import '../utils/app_global_data.dart';
16:
17: /// This class contains all the graphql queries and mutations
18:
…[truncated]

glob — {"path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App", "pattern": "lib/**/*global*"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/app_global_data.dart

glob — {"path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App", "pattern": "lib/**/*storage*"}

No files found

glob — {"path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App", "pattern": "lib/**/*pref*"}

/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_keys.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_helper.dart
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/prefetching_helper.dart

glob — {"path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App", "pattern": "lib/**/*auth*"}

No files found

glob — {"path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App", "pattern": "lib/**/*token*"}

No files found

glob — {"path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App", "pattern": "lib/**/*cookie*"}

No files found

Let me read the remaining critical files for the networking layer analysis.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/app_global_data.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/app_global_data.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'dart:async';
12:
13: import '../data_model/core_configs_model.dart';
14: import '../data_model/currency_language_model.dart';
15: import '../screens/cms_screen/data_model/cms_model.dart';
16: import '../screens/home_page/data
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_helper.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_helper.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:bagisto_app_demo/utils/server_configuration.dart';
12: import 'package:bagisto_app_demo/utils/shared_preference_keys.dart';
13: import 'package:bagisto_app_demo/utils/string_constants.dart';
14: import 'packag
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_keys.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_keys.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: /**
12: * this file contains the keys of shared preferences
13: */
14:
15: /// Configuration Shared Preference Keys
16: const String configCurrencyCode = "configCurrencyCode";
17: const String configCurrencySymbol = "configCur
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/prefetching_helper.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/prefetching_helper.dart</path>
<type>file</type>
<content>
1:
2: /*
3: * Webkul Software.
4: * @package Mobikul Application Code.
5: * @Category Mobikul
6: * @author Webkul <support@webkul.com>
7: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
8: * @license https://store.webkul.com/license.html
9: * @link https://store.webkul.com/license.html
10: */
11:
12: import 'package:bagisto_app_demo/utils/server_configuration.dart';
13: import 'package:flutter/material.dart';
14: import '../data_model/currency_language_model.dart';
15: import '../services/api_client.dart';
16: import 'app_
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/mutation_query.dart", "offset": 2001}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/mutation_query.dart</path>
<type>file</type>
<content>
2001: firstName
2002: lastName
2003: gender
2004: companyName
2005: address
2006: city
2007: state
2008: country
2009: postcode
2010: email
2011: phone
2012: vatId
2013: defaultAddress
2014: useForShipping
2015: createdAt
2016: updatedAt
2017: }
2018: }
2019: }
2020: """;
2021: }
2022:
2023: String subscribeNewsletter(String email) {
2024: return """
2025: mutation subscribe {
2026: subscribe (email: "$email") {
2027: success
2028: message
2029: }
2030: }
2031: """;
2032: }
2033:
2034: String downloadSample(String type, String id) {
2035: return
…[truncated]

Now let me read the pubspec.yaml for dependencies, and a few representative repositories to understand the pattern.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/pubspec.yaml"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/pubspec.yaml</path>
<type>file</type>
<content>
1: name: bagisto_app_demo
2: description: A new Flutter project.
3: # The following line prevents the package from being accidentally published to
4: # pub.dev using `flutter pub publish`. This is preferred for private packages.
5: publish_to: 'none' # Remove this line if you wish to publish to pub.dev
6:
7: # The following defines the version and build number for your application.
8: # A version number is three numbers separated by dots, like 1.2.43
9: # followed by an optional build number separated by a +.
10: # Both the version and the builder number may be over
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/home_page/bloc/home_page_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/home_page/bloc/home_page_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:bagisto_app_demo/screens/home_page/utils/index.dart';
12:
13: import '../../../data_model/add_to_wishlist_model/add_wishlist_model.dart';
14: import '../../cart_screen/cart_model/cart_data_model.
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/sign_in/bloc/sign_in_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/sign_in/bloc/sign_in_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11:
12: import 'package:bagisto_app_demo/screens/sign_in/utils/index.dart';
13:
14: abstract class SignInRepository {
15: Future<SignInModel> callSignInApi(String email, String password);
16:
17: Future<SignInModel?>
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/cart_screen/bloc/cart_screen_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/cart_screen/bloc/cart_screen_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11:
12:
13: import 'package:bagisto_app_demo/screens/cart_screen/utils/cart_index.dart';
14:
15: abstract class CartScreenRepository {
16: Future<CartModel?> getCartData();
17:
18: Future<AddToCartModel?> upd
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/product_screen/bloc/product_page_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/product_screen/bloc/product_page_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:bagisto_app_demo/data_model/product_model/booking_slots_modal.dart';
12:
13: import '../../../data_model/add_to_wishlist_model/add_wishlist_model.dart';
14: import 'package:bagisto_app_de
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/categories_screen/bloc/categories_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/categories_screen/bloc/categories_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: // ignore_for_file: file_names, avoid_print
12:
13: import '../../../data_model/add_to_wishlist_model/add_wishlist_model.dart';
14: import 'package:bagisto_app_demo/screens/categories_screen/utils/index
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/checkout/checkout_review/bloc/checkout_review_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/checkout/checkout_review/bloc/checkout_review_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11:
12: import '../../data_model/save_payment_model.dart';
13: import 'package:bagisto_app_demo/screens/checkout/utils/index.dart';
14:
15: abstract class CheckOutReviewRepository{
16: Future<S
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/wishList/bloc/wishlist_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/wishList/bloc/wishlist_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11:
12: import 'package:bagisto_app_demo/screens/wishList/utils/index.dart';
13:
14: import '../../cart_screen/cart_model/cart_data_model.dart';
15:
16: abstract class WishListRepository {
17: Future<WishListData?>
…[truncated]

Let me look at a few more critical files - the sign-in model, the Google Place model (likely REST), and search for any Dio/retrofit usage.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/sign_in_model/signin_model.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/sign_in_model/signin_model.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:bagisto_app_demo/data_model/graphql_base_model.dart';
12: import 'package:json_annotation/json_annotation.dart';
13:
14: part 'signin_model.g.dart';
15:
16: @JsonSerializable()
17: class SignInModel e
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/google_place_model.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/google_place_model.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:dio/dio.dart';
12: import 'package:retrofit/retrofit.dart';
13: import 'package:json_annotation/json_annotation.dart';
14:
15: part 'google_place_model.g.dart';
16:
17: @RestApi(baseUrl:"https://maps.googleap
…[truncated]

grep — `{“pattern”: “import.*dio|import.retrofit|Dio\(|Retrofit|@RestApi|@GET|@POST|@PUT|@DELETE”, “include”: “.dart”, “path”: “/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib”

…[truncated]`

Found 12 matches
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/check_box_group.dart:
Line 15: import 'package:dio/dio.dart';
Line 191: Dio dio = Dio();
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/google_place_model.dart:
Line 11: import 'package:dio/dio.dart';
Line 12: import 'package:retrofit/retrofit.dart';
Line 17: @RestApi(baseUrl:"https://maps.googleapis.com/maps/api/")
Line 20: @GET('place/textsearch/json?query={endPoint}')
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/add_review/view/add_review.dart:
Line 12: import 'package:dio/dio.dart';
/home/samb
…[truncated]

grep — {"pattern": "DioMediaType|import.*package:dio", "include": "*.dart", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib"}

Found 6 matches
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/check_box_group.dart:
Line 15: import 'package:dio/dio.dart';
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/add_review/view/add_review.dart:
Line 12: import 'package:dio/dio.dart';
Line 121: contentType: DioMediaType('image', 'png'),
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/services/api_client.dart:
Line 755: contentType: DioMediaType('image', 'png'));
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/data_model/google_place_model.dart:
Line 11: import 'package:dio/dio.dart';
/hom
…[truncated]

grep — {"pattern": "customerToken|accessToken|Bearer|Authorization", "include": "*.dart", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib"}

Found 15 matches
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/widgets/gdpr_webview.dart:
Line 33: appStoragePref.getCustomerToken()?.replaceFirst('Bearer ', '') ?? '';
Line 115: "Authorization": appStoragePref.getCustomerToken() ?? "",
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/widgets/common_webview.dart:
Line 40: "Authorization": appStoragePref.getCustomerToken() ?? "",
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_keys.dart:
Line 24: const String customerToken = "customerToken";
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/util
…[truncated]

grep — {"pattern": "internet_connection|InternetAddress|connectivity", "include": "*.dart", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib"}

Found 6 matches
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/check_internet_connection.dart:
Line 11: import 'package:internet_connection_checker/internet_connection_checker.dart';
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/home_page/widget/new_product_view.dart:
Line 17: import '../../../utils/check_internet_connection.dart';
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/home_page/widget/carousal_slider.dart:
Line 14: import '../../../utils/check_internet_connection.dart';
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/drawer/u
…[truncated]

Let me read a few more files to complete the analysis.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/check_internet_connection.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/check_internet_connection.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:internet_connection_checker/internet_connection_checker.dart';
12:
13: Future<bool> checkInternetConnection() async {
14: bool result = await InternetConnectionChecker.createInstance().hasConnection;
15: ret
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/location/bloc/location_repo.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/location/bloc/location_repo.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:dio/dio.dart';
12: import 'package:bagisto_app_demo/screens/location/utils/index.dart';
13:
14: abstract class LocationRepository {
15: Future<GooglePlaceModel> getPlace(String text);
16: }
17:
18: clas
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/check_box_group.dart", "limit": 30, "offset": 185}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/check_box_group.dart</path>
<type>file</type>
<content>
185: try {
186: final directory = Platform.isIOS
187: ? await getApplicationDocumentsDirectory()
188: : await getTemporaryDirectory();
189: final savedDir = directory.path;
190:
191: Dio dio = Dio();
192: String savePath =
193: "$savedDir/${DateTime.now().microsecondsSinceEpoch.toString()}_${filename ?? 'downloaded_file'}";
194: await dio.download(
195: url,
196: savePath,
197: onReceiveProgress: (received, total) {
198: if (total != -1) {
199: double progress = received / total;
200: _downloadProgressController.add(progress);
201: setState(() {
20
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/product_screen/view/file_download.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/product_screen/view/file_download.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11:
12: import 'dart:io';
13: import 'package:bagisto_app_demo/screens/product_screen/utils/index.dart';
14: import 'package:bagisto_app_demo/utils/push_notifications_manager.dart';
15:
16:
17: class DownloadFile {
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/product_screen/view/downloadable_product_sample.dart", "offset": 120, "limit": 40}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/product_screen/view/downloadable_product_sample.dart</path>
<type>file</type>
<content>
120: final status = await Permission.storage.request();
121: hasStoragePermission = status.isGranted;
122: }
123: if (hasStoragePermission) {
124: try {
125:
126: final directory = Platform.isIOS
127: ? await getApplicationDocumentsDirectory()
128: : await getTemporaryDirectory();
129: final savedDir = directory.path;
130:
131:
132: Dio dio = Dio();
133: String savePath = "$savedDir/${DateTime
134: .now()
135: .microsecondsSinceEpoch
136: .toString()}_${filename ?? 'downloaded_file'}";
137: await dio.download(
13
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/sign_in/bloc/sign_in_bloc.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/sign_in/bloc/sign_in_bloc.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11:
12:
13: import 'package:bagisto_app_demo/screens/sign_in/utils/index.dart';
14:
15: class SignInBloc extends Bloc<SignInBaseEvent, SignInBaseState> {
16: SignInRepository? repository;
17:
18: SignInBloc({@required this
…[truncated]

Let me check the payment web view and the gdpr webview for additional token handling, and look at how the app handles errors at the repository/bloc layer more broadly. Let me also check the location_repo more and the sign_in view to see how the token is stored after login.

bash — `cd “/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App” && wc -l lib/services/api_client.dart lib/services/mutation_query.dart lib/services/graph_ql.dart && echo “—MODEL COUNT-

…[truncated]`

1610 lib/services/api_client.dart
2194 lib/services/mutation_query.dart
56 lib/services/graph_ql.dart
3860 total
---MODEL COUNT---
47
---DIO/HTTP imports across lib---
5
lib/screens/add_review/bloc/add_review_event.dart:12:import 'package:http/http.dart';
lib/screens/add_review/bloc/add_review_repository.dart:15:import 'package:http/http.dart';
lib/screens/add_review/view/add_review.dart:14:import 'package:http/http.dart' as http;
lib/screens/add_review/view/widget/add_image_view.dart:22:import 'package:http/http.dart' as http;
lib/services/api_client.dart:54:import 'package:http/http.dart' as http;

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/checkout/checkout_save_order/view/payment_web_view.dart", "limit": 100}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/checkout/checkout_save_order/view/payment_web_view.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: *
4: * @package Mobikul Application Code.
5: * @Category Mobikul
6: * @author Webkul <support@webkul.com>
7: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
8: * @license https://store.webkul.com/license.html
9: * @link https://store.webkul.com/license.html
10: *
11: */
12:
13: import 'package:bagisto_app_demo/utils/app_global_data.dart';
14: import 'package:bagisto_app_demo/utils/shared_preference_helper.dart';
15: import 'package:flutter/material.dart';
16:
…[truncated]

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/widgets/common_webview.dart", "limit": 80}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/widgets/common_webview.dart</path>
<type>file</type>
<content>
1: import 'package:bagisto_app_demo/utils/index.dart';
2: import 'package:flutter/material.dart';
3: import 'package:flutter_inappwebview/flutter_inappwebview.dart';
4: import '../utils/app_constants.dart';
5: import 'dart:developer';
6:
7: class CommonWebView extends StatefulWidget {
8: final String? redirectUrl;
9: final String? title;
10:
11: const CommonWebView({super.key, this.redirectUrl, this.title});
12:
13: @override
14: State<StatefulWidget> createState() {
15: return CommonWebViewState();
16: }
17: }
18:
19: class CommonWebViewState
…[truncated]

Let me look at how the token is stored after login, and the add_review repository to understand the http/MultipartFile usage pattern. Let me also check how customerLogin stores the token.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/add_review/bloc/add_review_repository.dart"}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/add_review/bloc/add_review_repository.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: // ignore_for_file: file_names, avoid_print
12:
13: import 'package:bagisto_app_demo/screens/add_review/utils/index.dart';
14:
15: import 'package:http/http.dart';
16:
17: abstract class AddReviewRepository
…[truncated]

grep — {"include": "*.dart", "path": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib", "pattern": "setCustomerToken|setCustomerId|setCustomerLoggedIn"}

Found 13 matches
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/utils/shared_preference_helper.dart:
Line 90: setCustomerId(int customerIdNew) {
Line 98: setCustomerToken(String customerTokenValue) {
Line 134: setCustomerLoggedIn(bool isLoggedIn) {
/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/sign_in/view/sign_in_screen.dart:
Line 80: appStoragePref.setCustomerLoggedIn(true);
Line 83: appStoragePref.setCustomerToken("${_signInModel?.tokenType} ${_signInModel?.token}");
Line 84: appStoragePref.setCustomerId(int.parse(_signInModel?.data?.id ?? ""));
Line 105: await appStoragePref.setCustomerLoggedIn(true);
Li
…[truncated]

I now have a comprehensive picture. Let me verify the add_review view’s use of Dio for the multipart attachment handling and check the google place model generated file existence. Let me also quickly confirm the overall lib directory structure for models/repositories/services organization.

read — {"filePath": "/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/add_review/view/add_review.dart", "limit": 140}

<path>/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App/lib/screens/add_review/view/add_review.dart</path>
<type>file</type>
<content>
1: /*
2: * Webkul Software.
3: * @package Mobikul Application Code.
4: * @Category Mobikul
5: * @author Webkul <support@webkul.com>
6: * @Copyright (c) Webkul Software Private Limited (https://webkul.com)
7: * @license https://store.webkul.com/license.html
8: * @link https://store.webkul.com/license.html
9: */
10:
11: import 'package:bagisto_app_demo/screens/add_review/utils/index.dart';
12: import 'package:dio/dio.dart';
13: export 'dart:convert';
14: import 'package:http/http.dart' as http;
15:
16: class AddReview extends StatefulWi
…[truncated]

bash — `cd “/home/sambasene/dev/Yonko Business/Bagisto Mobikul/eCommerce-Flutter-App” && echo “=== services ===” && ls lib/services && echo “=== utils net/app files ===” && ls lib/utils | grep -iE “global|ser

…[truncated]`

=== services ===
api_client.dart
graph_ql.dart
mutation_query.dart
=== utils net/app files ===
app_global_data.dart
check_internet_connection.dart
prefetching_helper.dart
server_configuration.dart
shared_preference_helper.dart
shared_preference_keys.dart
=== generated .g files count ===
0

I now have a complete picture of the networking layer. Let me compile the comprehensive analysis.


Networking Layer Analysis — Bagisto Mobikul eCommerce Flutter App

Section titled “Networking Layer Analysis — Bagisto Mobikul eCommerce Flutter App”

This app does not use a conventional REST API layer. Its primary backend communication is via GraphQL using the graphql_flutter package, with the GraphQL operations (queries/mutations) hand-written as raw strings and inlined with literal values (rather than using GraphQL variables). A single ApiClient class in lib/services/api_client.dart (1,610 lines) is the sole facade. Secondary networking uses package:http for multipart uploads (file attachments for cart options, account avatar, and product reviews) and package:dio (with retrofit) for Google Places REST and file downloads.


Three HTTP libraries are in use, each for a distinct purpose:

Library Package Use
graphql_flutter ^5.1.1 primary All e-commerce API calls via GraphQLClient
http ^1.2.2 multipart Raw http.MultipartRequest for file uploads (add-to-cart with files, account avatar, review attachments)
dio ^5.3.3 + retrofit ^4.0.2 REST/downloads Google Places API (via generated Retrofit client), file downloads with progress
  • Dependencies declared in pubspec.yaml (lines 44, 67, 68, 72).
  • retrofit_generator ^8.2.1 and json_serializable are dev deps (note: 0 generated .g.dart files exist in the repo, suggesting build_runner output is not checked in).

GraphQL Client construction — lib/services/graph_ql.dart

Section titled “GraphQL Client construction — lib/services/graph_ql.dart”
class GraphQlApiCalling {
final loggerLink = LoggerLink();
final authLink = AuthLink(getToken: appStoragePref.getCustomerToken);
GraphQLClient clientToQuery() {
final httpLink = HttpLink(baseUrl, defaultHeaders: {
"Cookie": appStoragePref.getCookieGet(),
"x-currency": GlobalData.currencyCode,
"x-locale": GlobalData.locale,
"is-cookie-exist": "1"
});
return GraphQLClient(
cache: GraphQLCache(store: HiveStore()),
queryRequestTimeout: const Duration(seconds: 40),
link: loggerLink.concat(authLink.concat(httpLink)),
);
}
}
  • Link chain: LoggerLink → AuthLink → HttpLink.
  • A new GraphQLClient is created on every call (each ApiClient method invokes clientToQuery()), so there is no shared client instance.
  • HiveStore is used for the GraphQL cache backing.
  • The AuthLink reads the token from SharedPreferenceHelper via getCustomerToken.

Defined in lib/utils/server_configuration.dart:

const String baseDomain = ""; // EMPTY — must be set per install
const String baseUrl = "$baseDomain/graphql"; // e.g. https://example.com/graphql
const String defaultStoreCode = "en";
const String defaultCurrencyCode = "USD";
const String defaultAppTitle = "Bagisto App";
const bool isPreFetchingEnable = true;
  • baseDomain is an empty string — the developer/app installer must fill it in. There is no .env / --dart-define / flavor-based environment configuration. No env file, no dev/prod/staging split. Configuration is hardcoded constants.
  • The single endpoint is <baseDomain>/graphql (GraphQL POST endpoint).
  • Channel, store code, language, currency defaults are constants; the app swaps language/currency at runtime via GlobalData.locale / GlobalData.currencyCode sent as headers.
  • Google Places uses a separate hardcoded base URL: https://maps.googleapis.com/maps/api/ in google_place_model.dart.
  • Google Maps key is a placeholder literal YOUR_GOOGLE_MAPS_API_KEY in location_repo.dart.

There are no endpoint paths; all calls are GraphQL operations (queries or mutations) defined as inlined raw strings in:

  • lib/services/mutation_query.dart (2,194 lines) — class MutationsData holds every query/mutation as string-returning methods.
  • **`lib/services/a

…[truncated]

7 internal reasoning block(s) omitted — raw thinking is not exported (see archive index).