Akvelon | SwiftUI in Action
Nail Shakirov, the Director of Engineering at Akvelon's Kazan office, has written an article about the development of cross-platform mobile Share plugin using Flutter framework from Google with iOS and Android support
SwiftUI, Swift UI, Apple, iOS
28974
post-template-default,single,single-post,postid-28974,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-8.0,wpb-js-composer js-comp-ver-4.9.2,vc_responsive
 

13 Aug Flutter Share Plugin Development

 

This article was written by Nail Shakirov, the Director of Engineering at Akvelon’s Kazan office, and was originally published in Medium.

Comparison of the most popular Share plugins features with our needs

As a result, we decided to build our own solution — well designed, reliable, and feature-packed reusable Share plugin.

Our idea in this article is to share our Flutter plugin development experience that will help you to develop plugins faster, reliably, and effectively.

How to start: general principles of Flutter plugin development

  • Functionality first
    The natural way of designing an API is to wrap an existing functionality, exposing it to the consumer and making it possible to use it. However, while developing a cross-platform plugin you should note that different platforms may support different features, platform-native APIs may not be inconsistent between versions, etc. So, developing a plugin API you should consider your Dart API as a facade, for instance:

And then look for a platform-specific API that you will use for your goals.

  • Supported platforms
    If you’re creating a plugin that provides access to some general functionality, it will be a good way to consider supporting as many platforms as possible. But sometimes you’re creating a plugin that provides access to the specific platform API. In that case, you should specify that to avoid a misunderstanding with users.
  • Testability
    All of the general rules of writing testable code are applied to plugin development. It means that the smallest components should be independently verifiable. In order to do this, each component must have its dependencies injected into it. Consider placing all of your business logic on the Dart side and keep your native code layer as thin as possible, simply providing results. That will result in creating less code since you won’t have to repeat your logic for different platforms. In case of more complicated processing on the native side (for instance, biometric authentication), you should consider separation of logic to make it more unit-testable.

Our approach

STEP 1

STEP 2

STEP 3

As a result, we developed the Flutter Share Plugin which is available on GitHub and pub.dev platforms. It supports plain text and URLs, single and multiple media files share. Basically, you can share any file as long as native APIs are able to determine the attachment type.

How to market Flutter plugin

In October of 2019, they’ve announced a new feature — verified publishers. When you publish packages as a verified publisher, you get the bonus of easier package administration and publisher detail page. On that page, you can see a few more details, including a contact email for the publisher, a link to the publisher’s homepage, and a short description. The description is provided by the publisher, offering a small branding opportunity for your company.

During the publisher creation process, you’ll need to verify the ownership of the domain through DNS verification. The process is fully automated, so usually, accounts are created without any delay. You’ll just need to verify that you have admin access to the associated domain, based on existing logic in the Google Search Console. After the creation, you can transfer all of your existing packages to the verified publisher to get all the benefits.

Written in collaboration with Rustem Muzafarov

Nail Shakirov Project Manager Akvelon

Nail Shakirov is the Director of Engineering at Akvelon’s Kazan office. He has a solid software development background and experience in all software development stages: technical design, implementation, testing, and operation.

 


 

More Insights

SWIFTUI IN Action

 

Nail Shakirov, the Director of Engineering at Akvelon’s Kazan office, has written an article on “SwiftUI in Action” that was published on Medium.com. Read more here.

Webinar on Empowering and Innovating in Times of Change

Guest speakers from Microsoft, Limeade, and Quantarium join Akvelon’s Mark Boyes to discuss best practices for companies to encourage their teams to consolidate, innovate, grow, and thrive in times of enormous change and disruption. Watch the webinar recording here

Building In-app notification systems in react native

Akvelon Mobile & Front End Developer Vadim Korobeinikov has written an article on cross-platform mobile development with a focus on how to develop a reliable notification system using the power of React Native. Originally published on Medium. Read more here



Akvelon

Akvelon

We Make BIG Software Happen. Contact Us