1.

How would you execute code only in debug mode?

Answer»

We first need to import the dart foundation in order to RUN the CODE only in debug mode: 

import 'package:flutter/foundation.dart' as Foundation; The next step is to use kReleaseMode as FOLLOWS: if (Foundation.kReleaseMode){ // is Release Mode?? PRINT('release mode'); } else { print('debug mode'); }


Discussion

No Comment Found