init static method
Initializes all providers with an instance of ParodiaHTTP.
This method should only be called once. If the providers have already been initialized, it does nothing.
Implementation
static init(ParodiaHTTP http) {
if (_isInitialized) {
return;
}
// Add all providers to the list and initialize them with the http instance.
// Each provider is wrapped in a ChangeNotifierProvider to enable it to notify its listeners when changes occur.
// Replace the provider names with the actual names of your providers.
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaAssignedCatalogProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaAuthProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaBrandProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaBlogProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaCampaignProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaCategoryProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaCityProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaGlobalProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaFeatureProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaInStockProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaMailTemplateProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaOrderProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaOrderRefundProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaOutStockProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaPhotoProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaPhotoFolderProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaProductCatalogProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaProductPriceProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaProductPriceGroupProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaProductRatingProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaProductProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaProfileProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaPromoCodeProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaReportProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaRoleProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaRoleGroupProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStockProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStockListProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStoreRatingProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStoreProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStoreSettingProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStoreSettingCurrencyProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStoreShipmentMethodProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaStoreTypeProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaSuggestionProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaSupplierProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaTagProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaTaxProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaThemeProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaTicketProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaTicketCategoryProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaTimelineProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaTransferProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaUserGroupProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaUserProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaVariantProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaVariantGroupProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaVehicleProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaWarehouseProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaNotificationProvider.init(http),
),
);
providers.add(
ChangeNotifierProvider(
create: (_) => ParodiaCatalogProvider.init(http),
),
);
_isInitialized = true;
}