V
Size: a a a
V
V
У
DS
ИЦ
У
ИЦ
У
i
У
GV
У
GV
ИЦ
S
ДЩ
S
V
void addNewWidgetsToApp(String appId) async {
emit(AppWidgetsLoading());
if (appWidgets.isNotEmpty) {
try {
final oldWidgets = await sl<AppService>().getWidgetsByAppId(appId);
final addedProducts =
appWidgets.toSet().difference(oldWidgets.toSet()).toList();
addedProducts.forEach((e) async {
await sl<ProductService>().saveWidgetForApp(e, appId, e.userId);
});
emit(AppWidgetsLoaded(appWidgets));
} catch (e) {
print('APP_WIDGETS_CUBIT: addNewWidgetsToApp ERROR $e');
}
}
emit(AppWidgetsLoaded(appWidgets));
}
ИЦ
S