Open the Flutter app project settings in Xcode to share build
configurations.

    
      Navigate to the Info tab.
      Expand the Configurations group.
      Expand the Debug, Profile, and Release entries.
      For each of these configurations, make sure the value in the
 Based on configuration file drop-down menu for your
 extension matches the one selected for the normal app target.

(Optional) Replace any storyboard files with an extension class if needed.
    
      In the Info.plist file, delete the NSExtensionMainStoryboard property.
      Add the NSExtensionPrincipalClass property.
      Set this value for this property to the name of your ViewController.
 For example, in an iMessage extension you would use MessageViewController.

Embed the FlutterViewController as described in
Adding a Flutter Screen. For example, you can display a 
specific route in your Flutter app within an iMessage extension.