refactor: abstract pull-to-refresh empty state boilerplate into reusable widget - #21
refactor: abstract pull-to-refresh empty state boilerplate into reusable widget#21insign wants to merge 1 commit into
Conversation
…tyState This commit introduces a new core widget `RefreshableEmptyState` to encapsulate the verbose boilerplate of wrapping an empty state inside a `LayoutBuilder`, `SingleChildScrollView`, and `ConstrainedBox` just to make it pull-to-refreshable within a `RefreshIndicator`. This pattern was repeated across several screens (Workers list, DNS records, Pages lists). Abstracting it into a reusable widget significantly reduces code duplication, improving maintainability and readability across the codebase. Co-authored-by: insign <1113045+insign@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Encapsula o boilerplate extenso necessário para tornar estados vazios ("empty states") atualizáveis via pull-to-refresh.
Ao longo do projeto, existia um padrão repetitivo de envolver widgets de estado vazio em um
LayoutBuilder,SingleChildScrollVieweConstrainedBoxpara permitir que o gesto de pull-to-refresh funcionasse dentro de umRefreshIndicatorquando a lista está vazia.Este PR introduz o widget
RefreshableEmptyStateno core do projeto (lib/core/widgets/refreshable_empty_state.dart) e substitui as ocorrências desse boilerplate espalhadas pelas telas de Workers, DNS e Pages. Essa melhoria elimina código duplicado, padroniza a interface e aumenta a manutenibilidade do projeto.PR created automatically by Jules for task 7501417824711389159 started by @insign