Skip to Main Content
Flutter for Beginners
book

Flutter for Beginners

by Alessandro Biessek
September 2019
Beginner content levelBeginner
512 pages
12h 52m
English
Packt Publishing
Content preview from Flutter for Beginners

The SwiftHandsOnBackgroundProcessPlugin class

The registration and setup of the plugin is done in a similar way to the HandsOnBackgroundProcessPlugin class. This time, in the register() static function, we have the following:

public static func register(with registrar: FlutterPluginRegistrar) {    let channel = FlutterMethodChannel(        name: "com.example.handson/plugin_channel",         binaryMessenger: registrar.messenger()    )    let instance = SwiftHandsOnBackgroundProcessPlugin(        registrar: registrar    )            registrar.addMethodCallDelegate(instance, channel: channel)}

Like in the Android version, it configures the method channel called com.example.handson/plugin_channel, which is used to initialize the calculation through the initBackgroundProcess method, as ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flutter for Beginners - Second Edition

Flutter for Beginners - Second Edition

Thomas Bailey, Alessandro Biessek
Flutter for Beginners - Third Edition

Flutter for Beginners - Third Edition

Thomas Bailey, Alessandro Biessek

Publisher Resources

ISBN: 9781788996082Supplemental Content