Last active
September 23, 2021 03:23
-
-
Save ddikman/6a61230ba7bac22b6c9f58998f7868c7 to your computer and use it in GitHub Desktop.
Example of feature flagging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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