cpdf_tool_bar.dart 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:flutter/material.dart';
  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. class CPDFToolbar extends AppBar {
  9. final VoidCallback? onPressed;
  10. final Widget? leadingIcon;
  11. CPDFToolbar(
  12. {super.key,
  13. super.title,
  14. super.actions,
  15. super.backgroundColor,
  16. this.leadingIcon,
  17. super.bottom,
  18. this.onPressed})
  19. : super(
  20. leading: leadingIcon != null
  21. ? IconButton(
  22. onPressed: onPressed,
  23. icon: leadingIcon,
  24. splashRadius: 24,
  25. )
  26. : null,
  27. elevation: 2,
  28. titleSpacing: title == null ? 15 : 0,
  29. );
  30. }