Youssef El Behi
Youssef El Behi

Reputation: 3317

Display specific widget on flutter in debug mode

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

Answers (1)

Rémi Rousselet
Rémi Rousselet

Reputation: 277057

You can use kReleaseMode constant to do such thing:

MaterialApp(
  initialRoute: kReleaseMode == false ? '/some-dev-route' : '/',
)

Upvotes: 1

Related Questions