From the first days as a new parent.

This was written more for myself than anyone else. We had a plan, a really good one. The bag was packed and in the car 2 weeks in advance. I tore down the standard shelves in the house and custom…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Flutter Module in iOS App

In the previous story, I wrote how to implement a Flutter module into an existing Android App. Today, I’ll mention the implementation of a Flutter module into an iOS App that is generated with Objective-C. And, I’ll invoke native methods on the Flutter screen.

First, I created a Flutter module on the sibling directory with my host app with the following command:

In my host app, I modified the AppDelegate.h file with importing the Flutter like this:

And, modified the AppDelegate.m file to run the Flutter Engine in the `didFinishLaunchingWithOptions` method:

And, I have a button to navigate to the Dart side in my ViewController.m:

Now, I can easily invoke these methods with arguments and handle the native result models from my Flutter screen:

Add a comment

Related posts:

Palavra no ventre vazio

Como um tsunami que devasta a costa, o som da tua palavra penetrou e, através dos ouvidos, descendo, foi sentida no pescoço, apertado, no peito, gelado, estômago embrulhado e, finalmente, ventre…

You have the talent to succeed but do you have the guts to fail?

Failing for me was apocalyptic — even in primary school getting anything less than 90% was a failure to me. I was never smug about it because it wasn’t for anyone else, but me! From a young age, I…

Hormones fool your body

Hormones will not only fool your body, it also makes the body think that you are already pregnant. That is why you don't have a period anymore with the Mirena. This means we are fooling our bodies so bad...