Skip to content

Instantly share code, notes, and snippets.

@ddikman
Last active Sep 23, 2021
Embed
What would you like to do?
Example of feature flagging
void registerRoutes() {
// ...
final useNewArticlePage = isDebugMode == true;
if (useNewArticlePage) {
routing.register(Routes.Article, (context, param) => FixedSizeArticlePage());
} else {
routing.register(Routes.Article, (context, param) => ArticlePage());
}
// ....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment