/// task_status.dart /// /// Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved. /// /// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW /// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT. /// UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. /// This notice may not be removed from this file. enum TaskStatus { wait, start, converting, success, fail, cancel, } TaskStatus getConvertStatusByCode(int statusCode) { switch (statusCode) { case 0: return TaskStatus.wait; case 1: return TaskStatus.start; case 2: return TaskStatus.converting; case 3: return TaskStatus.success; case 4: return TaskStatus.fail; case 5: return TaskStatus.cancel; default: return TaskStatus.wait; } }