Some practice macros by @chooyan-eng.
@RouteMacro<T>
help us create .route()
static method that returns MaterialPageRoute<T>
for navigating to the page.
See next_page.dart for the usage of this macro.
With applying @Stateful
to your class with build()
method, you don't need to define StatefulWidget
class and State
class.
See book_list_page.dart for the usage of this macro.
@InheritedWidgetMacro
would solve the boilerplate issue of InheritedWidget
by defining .of
method and .maybeOf
method automatically. In addition, this macro tries to define StatefulWidget
to maintain InheritedWidget
's state.
This macro is still in progress and no example usage is comitted.