flutter_image_picker/lib/src/models/image_picker_theme.dart

93 lines
2.9 KiB
Dart
Raw Normal View History

2022-09-01 16:44:53 +02:00
import 'package:flutter/material.dart';
class ImagePickerTheme {
/// The [ImagePickerTheme] is used to style the [ImagePicker].
2022-09-06 14:22:28 +02:00
const ImagePickerTheme({
this.font = "Roboto",
this.title = "Upload Image",
this.titleTextSize = 20,
2022-09-08 14:23:46 +02:00
this.titleColor = Colors.black,
this.titleBackgroundColor = Colors.white,
this.titleAlignment = TextAlign.left,
2022-09-06 14:22:28 +02:00
this.textColor = Colors.black,
this.iconColor = Colors.black,
this.iconSize = 125,
this.iconTextSize = 15,
this.spaceBetweenIcons = 30,
this.makePhotoIcon,
2022-09-06 14:22:28 +02:00
this.makePhotoText = "Take a Picture",
this.selectImageIcon,
2022-09-06 14:22:28 +02:00
this.selectImageText = "Select File",
this.closeButtonText = "Close",
this.closeButtonTextSize = 15,
this.closeButtonTextColor = Colors.white,
this.closeButtonWidth = 300,
this.closeButtonHeight = 40,
this.closeButtonBackgroundColor = Colors.black,
});
/// The font that's used in the Image Picker
final String font;
2022-09-01 16:44:53 +02:00
2022-09-01 17:00:59 +02:00
/// The title displayed at the top of the Image Picker Dialog.
2022-09-01 16:44:53 +02:00
final String title;
2022-09-01 17:00:59 +02:00
/// The font size of the title mentioned above.
2022-09-01 16:44:53 +02:00
final double titleTextSize;
2022-09-01 17:00:59 +02:00
2022-09-08 14:23:46 +02:00
/// The color of the title text.
final Color titleColor;
/// The color of the title background.
final Color titleBackgroundColor;
/// The alignment of the title text.
final TextAlign titleAlignment;
2022-09-06 14:22:28 +02:00
/// The color of the icons
final Color iconColor;
/// The color of the text in the Image Picker Dialog
final Color textColor;
2022-09-01 17:00:59 +02:00
/// The size of the icons that are visible in the Image Picker Dialog.
2022-09-01 16:44:53 +02:00
final double iconSize;
2022-09-01 17:00:59 +02:00
/// The font size of the text underneath the icon buttons.
2022-09-01 16:44:53 +02:00
final double iconTextSize;
2022-09-01 17:00:59 +02:00
/// The size of the space between the two icons in the Image Picker Dialog.
2022-09-01 16:44:53 +02:00
final double spaceBetweenIcons;
2022-09-01 17:00:59 +02:00
/// The icon that is displayed for the 'Make Photo' functionality of the Image Picker Dialog.
final Widget? makePhotoIcon;
2022-09-01 17:00:59 +02:00
/// The text that is displayed underneath the 'Make Photo' icon.
2022-09-01 16:44:53 +02:00
final String makePhotoText;
2022-09-01 17:00:59 +02:00
/// The icon that is displayed for the 'Select Image From Gallery' functionality of the Image Picker Dialog.
final Widget? selectImageIcon;
2022-09-01 17:00:59 +02:00
/// The text that is displayed underneath the 'Select Image From Gallery' icon.
2022-09-01 16:44:53 +02:00
final String selectImageText;
2022-09-01 17:00:59 +02:00
/// The text that is shown on the 'Close Dialog' button at the bottom of the Image Picker Dialog.
2022-09-01 16:44:53 +02:00
final String closeButtonText;
2022-09-01 17:00:59 +02:00
2022-09-06 14:22:28 +02:00
/// The fontsize of the text of the close button of the Image Picker Dialog.
final double closeButtonTextSize;
/// The color of the text of the close button of the Image Picker Dialog.
final Color closeButtonTextColor;
2022-09-01 17:00:59 +02:00
/// The width of the 'Close Dialog' button at the bottom of the Image Picker Dialog.
final double closeButtonWidth;
/// The height of the 'Close Dialog' button at the bottom of the Image Picker Dialog.
final double closeButtonHeight;
2022-09-06 14:22:28 +02:00
/// The color of the close button of the Image Picker Dialog.
final Color closeButtonBackgroundColor;
2022-09-01 16:44:53 +02:00
}