Skip to content

Commit

Permalink
doc(framework): Fix reactter_provider template.
Browse files Browse the repository at this point in the history
  • Loading branch information
CarLeonDev committed Dec 22, 2023
1 parent 1a918ba commit 1969a9b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ abstract class ReactterProviderWrapper implements ReactterWrapperWidget {}
/// A Widget that provides an instance of [T] type to widget tree
/// that can be access through the methods [BuildContext] extension.
///
///```dart
/// ```dart
/// ReactterProvider<AppController>(
/// () => AppController(),
/// builder: (appController, context, child) {
/// return Text("StateA: ${appController.stateA.value}");
/// },
/// )
///```
/// ```
///
/// Use [id] property to identify the [T] instance.
///
/// Use [child] property to pass a [Widget] which to be built once only.
/// It will be sent through the [builder] callback, so you can incorporate it
/// into your build:
///
///```dart
/// ```dart
/// ReactterProvider<AppController>(
/// () => AppController(),
/// child: Text("This widget build only once"),
Expand All @@ -38,7 +38,7 @@ abstract class ReactterProviderWrapper implements ReactterWrapperWidget {}
/// );
/// },
/// )
///```
/// ```
/// > **RECOMMENDED:**
/// > Dont's use Object with constructor parameters to prevent conflicts.
///
Expand All @@ -47,7 +47,7 @@ abstract class ReactterProviderWrapper implements ReactterWrapperWidget {}
/// exposes the instance of [T] type defined on first parameter([InstanceContextBuilder])
/// through the [BuildContext] in the widget subtree:
/// >
/// >```dart
/// > ```dart
/// > ReactterProvider<AppController>(
/// > () => AppController(),
/// > builder: (appController, context, child) {
Expand All @@ -74,7 +74,7 @@ abstract class ReactterProviderWrapper implements ReactterWrapperWidget {}
/// > );
/// > }
/// > }
/// >```
/// > ```
/// >
/// > In the above example, stateA remains static while the [Builder] is rebuilt
/// > according to the changes in stateB. Because the [Builder]'s context kept in
Expand Down

0 comments on commit 1969a9b

Please sign in to comment.