Skip to content
pubscout

yx_scope_flutter

1.2.0, released 11 months ago by dev.go.yandex

An adapter package that provides yx_scope widgets for Flutter UI integration.

WASM-ready
$ flutter pub add yx_scope_flutter
Source repository

What it does

Provides Flutter widgets such as ScopeProvider, ScopeBuilder, ScopeListener, and ScopeConsumer to integrate yx_scope dependency management into the widget tree. It passes scopes down the tree and rebuilds widgets or triggers side effects in response to scope changes.

AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are already using yx_scope for dependency management in your application
  • You need to provide scopes down the Flutter widget tree using InheritedWidget
  • You want to rebuild widgets or trigger side effects based on scope state changes

Skip it when

  • You are not using the yx_scope package
  • You prefer a different dependency injection solution like get_it or provider

Strengths

  • Seamless integration between yx_scope and Flutter UI
  • Reduces boilerplate using widgets like ScopeConsumer
  • Supports fine-grained widget rebuilding and lifecycle listening

Weaknesses

  • Tightly coupled to the yx_scope ecosystem
  • Limited documentation outside of the repository introduction

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Requires adding yx_scope and yx_scope_flutter to dependencies and wrapping your app or subtree with ScopeProvider.

ScopeProvider<RootScopeContainer>(
  holder: scopeHolder,
  child: MaterialApp(
    home: ScopeBuilder<RootScopeContainer>.withPlaceholder(
      builder: (context, rootScope) => SomeWidget(rootScope),
      placeholder: const SizedBox.shrink(),
    ),
  ),
)

Alternatives

Packages that do the same job and could replace yx_scope_flutter.

  • get_it

    A popular standalone service locator for Dart and Flutter without scoping widgets.

  • flutter_modular

    Provides a complete modular architecture with built-in dependency injection and routing.

Works with

Packages commonly used together with yx_scope_flutter: ones it builds on, ones built on it, and its own family.