Flutter + Source Generation: The birth of a Magical Widget [Part 1]

Raef Mousheimish
Jan 14, 2019 · 6 min read
Image for post
Image for post

Flutter



Source Generation


Magical Widget

@Alakazam()
enum UIConfigTyle {
enableSendBtn$bool,
enableContinueBtn$bool,
enableProgressIndicator$bool,
enableErrorBox$bool,
alreadySent$bool,
enableMobileTxt$bool$true,
mobileNumberTxtField,
verificationCodeTxtField,
countryPickerField$String$Lebanon_00961
}
Enable/Disable Button based on Number of character in the text field. Choosing a country change the text field
Show/Hide UI elements. Dynamic error box. Clicking on wrong mobile number will clear the state.
Dynamic and context-dependent error box

Flutter Community

Articles and Stories from the Flutter Community

Raef Mousheimish

Written by

Currently a Lead data scientist at a French startup called Cognitus, located in Paris. Also, got my PhD. in real-time processing systems and data mining.

Flutter Community

Articles and Stories from the Flutter Community

Raef Mousheimish

Written by

Currently a Lead data scientist at a French startup called Cognitus, located in Paris. Also, got my PhD. in real-time processing systems and data mining.

Flutter Community

Articles and Stories from the Flutter Community

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store