Skip to content

Commit

Permalink
docs: remove reference to static metaprogramming
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryConrad authored Jan 30, 2025
1 parent 4c4fbd2 commit d6176b7
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,6 @@ And then, if you are using Flutter, define some widgets:
// Widgets are just like a special kind of capsule!
// Instead of a CapsuleHandle, they consume a WidgetHandle.
// They also live at the top level.
@rearchWidget
Widget counterAppBody(BuildContext context, WidgetHandle use) {
final (count, incrementCount) = use(countManager);
final countPlusOne = use(countPlusOneCapsule);
return Scaffold(
appBar: AppBar(title: Text('ReArch Demo')),
floatingActionButton: FloatingActionButton(
onPressed: incrementCount,
tooltip: 'Increment',
child: Icon(Icons.add),
),
body: Center(
child: Text(
'$count + 1 = $countPlusOne',
style: TextTheme.of(context).headlineLarge,
),
),
);
}
// Or, until static metaprogramming roles around:
class CounterAppBody extends RearchConsumer {
const CounterAppBody({super.key});
Expand All @@ -101,10 +80,6 @@ class CounterAppBody extends RearchConsumer {
}
```

*Note: the `@rearchWidget` above requires
[static metaprogramming](https://github.com/dart-lang/language/issues/1482),
which has not yet been released.*


## Getting Started
### With Flutter
Expand Down

0 comments on commit d6176b7

Please sign in to comment.