Skip to content

update examples/api/lib/widgets/framework/error_widget.0.dart example #97479

@maxzod

Description

@maxzod

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectd: api docsIssues with https://api.flutter.dev/d: examplesSample code and demosframeworkflutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions