Bringing Google Maps to Flutter: The Power of Plugins
Flutter is a popular cross platform UI toolkit. It allows to develop high quality mobile apps for multiple platforms (Android, iOS, Web, and more) from a single code base. But some app functionality depends on platform specific APIs, a requirement that is seemingly at odds with “one codebase for all platforms”. To bridge this gap, Flutter defined the concept of Plugins to access native apis from cross-platform code.
In this talk I will build a simple Flutter app that displays a map, looks up an address (geo-coding) and plots a route (directions) with help of two existing flutter plugins. Both are cross-platform but under the hood make use of platform-specific apis, combining multiple platform specific solutions into single developer friendly packages.
After showing how to integrate the Google Maps and geocoding packages into my app, I will dissect the basic structure of the two plugins and discuss how a developer might extend them, for example by adding support for a new platform.