Skip to content

Update path_provider mock example on 'Reading and writing files' page #8442

@stuartmorgan-g

Description

@stuartmorgan-g

https://flutter.dev/docs/cookbook/persistence/reading-writing-files#testing demonstrates mocking the method channel for path provider, but not all path provider implementations use a method channel (notably, path_provider_linux; see discussion)

Instead it should be showing mocking out the platform provider, as is done here, since that's the recommended way of mocking out plugins that are using the new platform interface structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a.cookbookRelates to a cookbook recipe or guidedev.pluginRelates to Flutter pluginse1-hoursEffort: < 8 hrsfix.code-sampleNeeds new or updated code samplep2-mediumNecessary but not urgent concern. Resolve when possible.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions