Skip to content

A practice repository for Dart macros for Flutter development

Notifications You must be signed in to change notification settings

chooyan-eng/macros_practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macros_practice

Some practice macros by @chooyan-eng.

Macros

route_macro.dart

@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.

stateful_widget_macro.dart

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.

inherited_widget_macro.dart

@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.

About

A practice repository for Dart macros for Flutter development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published