Skip to content

Instantly share code, notes, and snippets.

View dtodt's full-sized avatar
🏠
Working from home

Daniel Otavio Todt dtodt

🏠
Working from home
View GitHub Profile
@dtodt
dtodt / listenable_store.dart
Last active September 15, 2022 15:07
SSP - Listenable approach [IoC Propagation]
// Package imports:
import 'package:flutter/material.dart';
import 'package:flutter_triple/flutter_triple.dart';
//
abstract class ListenableStore<Error extends Object, State extends Object>
extends ValueNotifier<Triple<Error, State>> {
ListenableStore(State state) : super(Triple(state: state));
State get state => value.state;
@dtodt
dtodt / Retry.java
Last active February 23, 2023 18:18
Retrofit2@2.5.0 - Retry Adapter Factory - Call & CompletableFuture
package com.company.retrofit2.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**