Cross Platform Interface Stub Pattern For Flutter

Fred Grott
4 min readMar 20

One of the Flutter cross-platform tricks is an interface stub pattern to deliver platform specific library implementations to the Flutter app. Let me show you how this works with how we access the platform specific shared preferences libraries.

The Shared Preferences Example