Reputation: 3317
Is it possible to display a specific widget or a screen on a device or an emulator on debug mode without passing through previous screens in flutter ? for instance as a simple example, moving directly to a timeline screen without passing through the login/register screen ?
Upvotes: 0
Views: 438
Reputation: 277057
You can use kReleaseMode
constant to do such thing:
MaterialApp(
initialRoute: kReleaseMode == false ? '/some-dev-route' : '/',
)
Upvotes: 1