plus_plugins
plus_plugins copied to clipboard
[Request] device_info_plus has no setMockInitialValues
Plugin
device_info_plus
Use case
Hi. I need to test DeviceInfoPlugin.deviceInfo() and I need a qucik and easy way to mock its values.
I use PackageInfo and SharedPreferences; there, I am used to just call .setMockInitialValues. This API is very handy when testing.
But DeviceInfoPlugin doesn't have this API. Why?
Workarounds
When testing, I am injecting a BaseDeviceInfo with @riverpod 's .overrideWith methods.
Proposal
Let DeviceInfo.setMockInitialValues be a thing.