This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _applyTemplateData( | |
Map<Organization, List<Account>> organizationsToAccountsMap, | |
) { | |
if (_templateBuy != null) { | |
_applyTemplateDataBuy(organizationsToAccountsMap, _templateBuy); | |
} else if (_templateSell != null) { | |
_applyTemplateDataSell(organizationsToAccountsMap, _templateSell); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Помощник с логикой пагинации | |
class PaginationHelper<T> { | |
static const double _defaultPaginationOffset = 50; | |
/// Смещение от конца прокрутки после которого начинать пагинацию | |
double paginationOffset; | |
/// Контроллер прокрутки | |
ScrollController scrollController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Билдер [WidgetModel] для экрана Дэшборда [DashboardScreen] | |
DashboardWidgetModel createDashboardScreenWm(BuildContext context) { | |
final component = Injector.of<DashboardScreenComponent>(context).component; | |
final dependencies = WidgetModelDependencies( | |
errorHandler: StandardErrorHandler( | |
component.messageController, | |
component.dialogController, | |
component.sessionInteractor, | |
component.authInteractor, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///Базовый класс для обработки ошибок, связанных с сервисным слоем | |
abstract class NetworkErrorHandler implements ErrorHandler { | |
@override | |
void handleError(Object error) { | |
Object e; | |
bool isSilent = false; | |
bool isOverlayed = false; | |
if (error is SilentException) { | |
e = error.originalError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
/// виджет для настройки статус-бара | |
/// [child] - дочерний виджет для вёрстки всего остального экрана | |
/// | |
/// [statusBarColor] - цвет статус-бара (по-умолчанию прозрачный) | |
/// | |
/// [iconTone] - тон иконок в статус-баре (светлые/тёмные) | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Виджет "звездного" прогресс-бара. | |
* | |
* Для корректной работы необходимо в рантайме задать значение [@see totalProgress], а затем задать | |
* актуальное значение [@see currentProgress]. | |
* | |
* Четыре цвета градиента задаются через XML-атрибуты: | |
* * [@see ProgressStarView_psv_color_start] | |
* * [@see ProgressStarView_psv_color_middle_1] | |
* * [@see ProgressStarView_psv_color_middle_2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (rateViewInRecyclerView != null) { | |
val offset: Float | |
if (rateViewInRecyclerView.top < post_rate_container.top) { | |
offset = (rateViewInRecyclerView.top - post_rate_container.top).toFloat() | |
post_rate_container.animate().yBy(offset).setDuration(0)?.start() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_content_rv.addOnScrollListener(object : RecyclerView.OnScrollListener() { | |
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) { | |
super.onScrolled(recyclerView, dx, dy) | |
val rateViewInRecyclerView: View? = | |
postAdapter.stickyLayoutManager.findViewByPosition(postItems.indexOf(rateBaseItem)) | |
if (rateViewInRecyclerView != null) { | |
if (rateViewInRecyclerView.yLocationInWindow() != 0 && | |
(rateViewInRecyclerView.yLocationInWindow() < initialRateViewYPosition)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector ...> | |
<path android:name="long-shadow" | |
android:pathData="..."> | |
<aapt:attr name="android:fillColor"> | |
<gradient | |
android:type="radial" | |
android:centerX="54" | |
android:centerY="54" | |
android:gradientRadius="76.37"> | |
<!-- 15% black from center to 32% stop --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"file_source_identifier": null, | |
"file_creator_id": null, | |
"workorder_id": 952, | |
"file_mime": null, | |
"campaign_uid": "AAAA-BBBB-CCCC", | |
"file_name": null, | |
"campaign_state": "campaign_state/open", |
NewerOlder