Skip to content

Instantly share code, notes, and snippets.

/// Помощник с логикой пагинации
class PaginationHelper<T> {
static const double _defaultPaginationOffset = 50;
/// Смещение от конца прокрутки после которого начинать пагинацию
double paginationOffset;
/// Контроллер прокрутки
ScrollController scrollController;
/// Билдер [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,
///Базовый класс для обработки ошибок, связанных с сервисным слоем
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;