2022-11-01 08:24:41 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 Iconica
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
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({
|
2024-02-06 16:18:57 +01:00
|
|
|
this.font = 'Roboto',
|
|
|
|
this.title = 'Upload Image',
|
2022-09-06 14:22:28 +02:00
|
|
|
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,
|
2022-09-26 12:00:55 +02:00
|
|
|
this.makePhotoIcon,
|
2024-02-06 16:18:57 +01:00
|
|
|
this.makePhotoText = 'Take a Picture',
|
2022-09-26 12:00:55 +02:00
|
|
|
this.selectImageIcon,
|
2024-02-06 16:18:57 +01:00
|
|
|
this.selectImageText = 'Select File',
|
|
|
|
this.closeButtonText = 'Close',
|
2022-09-06 14:22:28 +02:00
|
|
|
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
|
|
|
|
2024-02-06 16:18:57 +01:00
|
|
|
/// The icon that is displayed for the 'Make Photo' functionality of the
|
|
|
|
/// Image Picker Dialog.
|
2022-09-26 12:00:55 +02:00
|
|
|
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
|
|
|
|
2024-02-06 16:18:57 +01:00
|
|
|
/// The icon that is displayed for the 'Select Image From Gallery'
|
|
|
|
/// functionality of the Image Picker Dialog.
|
2022-09-26 12:00:55 +02:00
|
|
|
final Widget? selectImageIcon;
|
2022-09-01 17:00:59 +02:00
|
|
|
|
2024-02-06 16:18:57 +01: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
|
|
|
|
2024-02-06 16:18:57 +01: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;
|
|
|
|
|
2024-02-06 16:18:57 +01:00
|
|
|
/// The width of the 'Close Dialog' button at the bottom of the Image Picker
|
|
|
|
/// Dialog.
|
2022-09-01 17:00:59 +02:00
|
|
|
final double closeButtonWidth;
|
|
|
|
|
2024-02-06 16:18:57 +01:00
|
|
|
/// The height of the 'Close Dialog' button at the bottom of the Image Picker
|
|
|
|
/// Dialog.
|
2022-09-01 17:00:59 +02:00
|
|
|
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
|
|
|
}
|