flutter_image_picker/lib/src/models/image_picker_theme.dart

56 lines
1.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].
const ImagePickerTheme(
{this.title = "Upload Image",
this.titleTextSize = 20,
this.iconSize = 125,
this.iconTextSize = 15,
this.spaceBetweenIcons = 30,
this.makePhotoIcon = Icons.camera_alt_rounded,
this.makePhotoText = "Take a Picture",
this.selectImageIcon = Icons.image,
this.selectImageText = "Select File",
2022-09-01 17:00:59 +02:00
this.closeButtonText = "Close",
this.closeButtonWidth = 300,
this.closeButtonHeight = 40});
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
/// 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.
2022-09-01 16:44:53 +02:00
final IconData 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.
2022-09-01 16:44:53 +02:00
final IconData 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
/// 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-01 16:44:53 +02:00
}