123456789101112131415161718192021222324252627282930313233343536373839 |
- import 'package:flutter/material.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.
- class CPDFToolbar extends AppBar {
- final String titleText;
- final VoidCallback? onPressed;
- final Widget? leadingIcon;
- CPDFToolbar(
- {super.key,
- this.titleText = '',
- super.actions,
- super.backgroundColor,
- this.leadingIcon,
- super.bottom,
- this.onPressed})
- : super(
- leading: leadingIcon != null
- ? IconButton(
- onPressed: onPressed,
- icon: leadingIcon,
- splashRadius: 24,
- )
- : null,
- elevation: 2,
- title: Text(titleText,
- style: const TextStyle(
- fontFamily: 'sans-serif-medium', fontSize: 22)),
- titleSpacing: titleText.isEmpty ? 15 : 0,
- );
- }
|