-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/d: examplesSample code and demosSample code and demosframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
flutter has a bool cost kDebugMode
and this example
https://github.com/flutter/flutter/blob/6e49cce18f26c24027f92dabf903ef51baa43250/examples/api/lib/widgets/framework/error_widget.0.dart
uses assertion to run a specific code in debug only
this works fine but new comers might does not know that assert works only on debug
using the const (kDebugMode) will make it more clear
since the example is about the error handling not about assert use cases
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/d: examplesSample code and demosSample code and demosframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight