cpdf_display_settings_page.dart 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ///
  2. /// Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  3. ///
  4. /// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  5. /// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  6. /// UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  7. /// This notice may not be removed from this file.
  8. import 'package:compdfkit_flutter/common/util/Strings.dart';
  9. import 'package:compdfkit_flutter/core/cpdf_view_ctrl.dart';
  10. import 'package:compdfkit_flutter/widgets/common/views/cpdf_scaffold.dart';
  11. import 'package:compdfkit_flutter/widgets/common/views/cpdf_tool_bar.dart';
  12. import 'package:compdfkit_flutter/widgets/viewer/pdfdisplaysettings/cpdf_display_mode_widget.dart';
  13. import 'package:compdfkit_flutter/widgets/viewer/pdfdisplaysettings/cpdf_page_mode_widget.dart';
  14. import 'package:compdfkit_flutter/widgets/viewer/pdfdisplaysettings/cpdf_page_setting_widget.dart';
  15. import 'package:compdfkit_flutter/widgets/viewer/pdfdisplaysettings/cpdf_themes_widget.dart';
  16. import 'package:flutter/material.dart';
  17. class CPDFDisplaySettingsPage extends StatefulWidget {
  18. final bool isDark;
  19. final CPDFViewCtrl ctrl;
  20. const CPDFDisplaySettingsPage(
  21. {Key? key, this.isDark = false, required this.ctrl})
  22. : super(key: key);
  23. @override
  24. State<CPDFDisplaySettingsPage> createState() =>
  25. _CPDFDisplaySettingsPageState();
  26. }
  27. class _CPDFDisplaySettingsPageState extends State<CPDFDisplaySettingsPage> {
  28. @override
  29. void initState() {
  30. super.initState();
  31. }
  32. @override
  33. Widget build(BuildContext context) {
  34. return CPDFScaffold(
  35. isDark: widget.isDark,
  36. appBar: CPDFToolbar.normal(
  37. context: context,
  38. titleText: Strings.ViewSetting,
  39. leadingOnPressed: () {
  40. Navigator.pop(context);
  41. },
  42. ),
  43. body: Column(
  44. crossAxisAlignment: CrossAxisAlignment.start,
  45. children: [
  46. CPDFDisplayModeWidget(ctrl: widget.ctrl),
  47. CPDFPageModeWidget(ctrl: widget.ctrl),
  48. CPDFPageSettingWidget(ctrl: widget.ctrl),
  49. CPDFThemesWidget(ctrl: widget.ctrl)
  50. ],
  51. ),
  52. );
  53. }
  54. }