123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- ///
- /// 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.
- class CPDFOutlineData {
- int level = 1;
- String title = '';
- int pageIndex = 0;
- bool expanded = false;
- List<CPDFOutlineData>? childOutline;
- CPDFOutlineData(
- {this.level = 1, this.title = '', this.pageIndex = 0, this.childOutline});
- CPDFOutlineData.formJson(Map<String, dynamic> json) {
- level = json['level'];
- title = json['title'];
- pageIndex = json['pageIndex'];
- childOutline = parse(json['childOutline']);
- }
- List<CPDFOutlineData> parse(List<dynamic> list) {
- List<CPDFOutlineData> datas = List.empty(growable: true);
- for (var value in list) {
- datas.add(CPDFOutlineData.formJson(value));
- }
- return datas;
- }
- @override
- String toString() {
- return 'title: $title, level: $level, pageIndex:$pageIndex, childOutline:${childOutline.toString()} ';
- }
- }
|