package Ġcom . flu ency bank . flutter _ on f ido Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . annotation . NonNull Ċ import Ġcom . on f ido . android . sdk . capture . On f ido Factory Ċ import Ġio . flutter . embedding . engine . plugins . Flutter Plugin Ċ import Ġio . flutter . embedding . engine . plugins . activity . Activity Aware Ċ import Ġio . flutter . embedding . engine . plugins . activity . Activity Plugin Binding Ċ import Ġio . flutter . plugin . common . Binary Messenger Ċ import Ġio . flutter . plugin . common . MethodCall Ċ import Ġio . flutter . plugin . common . Method Channel Ċ import Ġio . flutter . plugin . common . Method Channel . MethodCall Handler Ċ import Ġio . flutter . plugin . common . Method Channel . Result Ċ Ċ /** ĠFlutter On f ido Plugin Ġ*/ Ċ class ĠFlutter On f ido Plugin Ġ: ĠFlutter Plugin , ĠMethod Call Handler , ĠActivity Aware Ġ{ ĊĠ Ġprivate Ġlateinit Ġvar Ġon f ido Sdk : ĠOn f ido Sdk ĊĠ Ġprivate Ġlateinit Ġvar Ġactivity Listener : ĠOn f ido Sdk Activity EventListener ĊĠ Ġprivate Ġlateinit Ġvar Ġmethod Channel : ĠMethod Channel ĊĠ Ġprivate Ġlateinit Ġvar Ġapplication Context : ĠContext ĊĠ Ġprivate Ġlateinit Ġvar Ġplugin Binding : ĠActivity Plugin Binding ĊĊĠ Ġoverride Ġfun Ġon Attached To Engine (@ NonNull Ġflutter Plugin Binding : ĠFlutter Plugin . Flutter Plugin Binding ) Ġ{ ĊĠĠĠ Ġon Attached To Engine ( flutter Plugin Binding . application Context , Ġflutter Plugin Binding . binary Messenger ) ĊĠ Ġ} ĊĊĠ Ġ@ Suppress (" UN CHECK ED _ CAST ") ĊĠ Ġoverride Ġfun Ġon MethodCall (@ NonNull Ġcall : ĠMethod Call , Ġ@ NonNull Ġresult : ĠResult ) Ġ{ ĊĠĠĠ Ġif Ġ( call . method Ġ== Ġ" start ") Ġ{ ĊĠĠĠĠĠ Ġval Ġarguments Ġ= Ġcall . arguments Ġas ĠHashMap < *, Ġ*> ĊĠĠĠĠĠ Ġval Ġconfig Ġ= Ġarguments [" config "] Ġas ĠHashMap < String , ĠAny ?> ĊĠĠĠĠĠ Ġval Ġlisten To User Events Ġ= Ġarguments [" listen To User Events "] Ġas ? ĠBoolean Ġ?: Ġfalse ĊĠĠĠĠĠ Ġon f ido Sdk . start ( config , Ġlisten To User Events , Ġresult ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġresult . not Implemented () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġon Attached To Engine ( context : ĠContext , Ġmess enger : ĠBinary Messenger ) Ġ{ ĊĠĠĠ Ġapplication Context Ġ= Ġcontext ĊĠĠĠ Ġmethod Channel Ġ= ĠMethod Channel ( messenger , Ġ" flutter _ on f ido ") ĊĠĠĠ Ġmethod Channel . set MethodCall Handler ( this ) ĊĠĠĠ Ġval Ġon f ido Client Ġ= ĠOn f ido Factory . create ( context ). client ĊĠĠĠ Ġactivity Listener Ġ= ĠOn f ido Sdk Activity EventListener ( on f ido Client ) ĊĠĠĠ Ġon f ido Sdk Ġ= ĠOn f ido Sdk ( null , Ġactivity Listener , Ġon f ido Client , Ġmethod Channel , Ġnull ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Detached From Engine (@ NonNull Ġbinding : ĠFlutter Plugin . Flutter Plugin Binding ) Ġ{ ĊĠĠĠ Ġmethod Channel . set MethodCall Handler ( null ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Detached From Activity () Ġ{ ĊĠĠĠ Ġon f ido Sdk . set Activity ( null ) ĊĠĠĠ Ġplugin Binding . remove Activity Result Listener ( activity Listener ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Re attached To Activity For Config Changes ( binding : ĠActivity Plugin Binding ) Ġ{ ĊĠĠĠ Ġon Re attached To Activity For Config Changes ( binding ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Attached To Activity ( binding : ĠActivity Plugin Binding ) Ġ{ ĊĠĠĠ Ġon f ido Sdk . set Activity ( binding . activity ) ĊĠĠĠ Ġplugin Binding Ġ= Ġbinding ĊĠĠĠ Ġplugin Binding . add Activity Result Listener ( activity Listener ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Detached From Activity For Config Changes () Ġ{ ĊĠĠĠ Ġon Detached From Activity For Config Changes () ĊĠ Ġ} Ċ } Ċ