Open GregoryConrad opened 11 months ago
Given macros could potentially be a year away or longer, would it be worth adding the macros using build_runner for now?
@opsb unfortunately I don’t have the time to go out and learn build_runner right now. Macros in ReArch aren’t going to bring any new features to the table, but rather just be a QoL improvement for boilerplate reduction.
@rearchSideEffect TextEditingController _textEditingController(UseUnstatePlugin use, String? initialText) { final controller = use.memo(() => TextEditingController(text: initialText)); use.effect(() => controller.dispose, [controller]); return controller; }
// Generates an extension: extension UseTextEditingController on UseUnstatePlugin { TextEditingController textEditingController(String? initialText) { return textEditingController(this, initialText); } }