/* Ċ Ġ* ĠThis Ġfile Ġis Ġpart Ġof Ġthe ĠSc and it ĠData ĠCapture ĠSDK Ċ Ġ* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 2 0 - ĠSc and it ĠAG . ĠAll Ġrights Ġreserved . Ċ Ġ*/ Ċ package Ġcom . sc and it . datac apt ure . flutter . barcode . tracking Ċ Ċ import Ġio . flutter . embedding . engine . plugins . Flutter Plugin Ċ import Ġio . flutter . plugin . common . MethodCall Ċ import Ġio . flutter . plugin . common . Method Channel Ċ Ċ /** ĠSc and it Flutter Data Capture Barcode Tracking Plugin Ġ*/ Ċ class ĠSc and it Flutter Data Capture Barcode Tracking Plugin ( ĊĠĠĠ Ġprivate Ġval Ġflutter Barcode Tracking Handler : ĠSc and it Flutter Data Capture Barcode Tracking Handler , Ċ ) Ġ: ĠFlutter Plugin , ĠMethod Channel . MethodCall Handler Ġ{ ĊĠĠĠ Ġprivate Ġvar Ġmethod Channel Defaults : ĠMethod Channel ? Ġ= Ġnull ĊĠĠĠ Ġprivate Ġvar Ġmethod Channel Tracking Listener : ĠMethod Channel ? Ġ= Ġnull ĊĊĠĠĠ Ġoverride Ġfun Ġon Attached To Engine ( binding : ĠFlutter Plugin . Flutter Plugin Binding ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmethod Channel Defaults Ġ= ĠMethod Channel ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . binary Messenger , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" com . sc and it . datac apt ure . barcode . tracking . method / barcode _ tracking _ defaults " ĊĠĠĠĠĠĠĠ Ġ). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . set MethodCall Handler ( this ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġmethod Channel Tracking Listener Ġ= ĠMethod Channel ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . binary Messenger , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" com . sc and it . datac apt ure . barcode . tracking . method / barcode _ tracking _ listener " ĊĠĠĠĠĠĠĠ Ġ). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . set MethodCall Handler ( this ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġflutter Barcode Tracking Handler . on Attached To Engine () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Detached From Engine ( binding : ĠFlutter Plugin . Flutter Plugin Binding ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmethod Channel Defaults ?. set MethodCall Handler ( null ) ĊĠĠĠĠĠĠĠ Ġmethod Channel Tracking Listener ?. set MethodCall Handler ( null ) ĊĠĠĠĠĠĠĠ Ġflutter Barcode Tracking Handler . on Detached From Engine () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon MethodCall ( call : ĠMethod Call , Ġresult : ĠMethod Channel . Result ) Ġ{ ĊĠĠĠĠĠĠĠ Ġwhen Ġ( call . method ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMETHOD _ GET _ BAR CODE _ TRACK ING _ DEFAULT S Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġresult . success ( flutter Barcode Tracking Handler . getDefault s As Json ()) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMETHOD _ ADD _ BAR CODE _ TRACK ING _ LIST ENER Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġflutter Barcode Tracking Handler . add Barcode Tracking Listener () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġresult . success ( null ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMETHOD _ REMOVE _ BAR CODE _ TRACK ING _ LIST ENER Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġflutter Barcode Tracking Handler . remove Barcode Tracking Listener () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġresult . success ( null ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMETHOD _ TRACK ING _ FIN ISH _ DID _ UPDATE _ SESSION Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġflutter Barcode Tracking Handler . finish Did Update Session ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcall . arguments Ġas ? ĠBoolean Ġ?: Ġfalse ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġresult . success ( true ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġelse Ġ-> Ġresult . not Implemented () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠMETHOD _ GET _ BAR CODE _ TRACK ING _ DEFAULT S Ġ= Ġ" get Barcode Tracking Defaults " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠMETHOD _ ADD _ BAR CODE _ TRACK ING _ LIST ENER Ġ= Ġ" add Barcode Tracking Listener " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠMETHOD _ REMOVE _ BAR CODE _ TRACK ING _ LIST ENER Ġ= Ġ" remove Barcode Tracking Listener " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠMETHOD _ TRACK ING _ FIN ISH _ DID _ UPDATE _ SESSION Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" barcode Tracking Finish Did Update Session " ĊĠĠĠ Ġ} Ċ } Ċ