layrz_theme library
Classes
- ContainCamera
- Emoji
- Emoji class.
- Layo
- NamedIcon
- ResponsiveCol
- ResponsiveRow
- StartGoogleStreetView
- StopGoogleStreetView
- ThemedAboutDialog
- ThemedActionButton
- ThemedActionsButtons
- ThemedAnimatedCheckbox
- ThemedAppBar
- ThemedAppBarAvatar
- ThemedAvatarPicker
- ThemedBottomBar
- ThemedButton
- ThemedCalendar
- ThemedCalendarEntry
- ThemedCalendarRangeEntry
- ThemedChangeLayerDialog
- ThemedCheckboxInput
- ThemedCodeEditor
- ThemedCodeError
- ThemedCodeSnippet
- ThemedColorPicker
-
ThemedColumn<
T> - ThemedCustomNotificationLocation
- ThemedDatePicker
- ThemedDateRangePicker
- ThemedDateTimePicker
- ThemedDateTimeRangeDialog
- ThemedDateTimeRangePicker
- ThemedDualBar
-
ThemedDualListInput<
T> - ThemedDurationInput
- ThemedDynamicAvatarInput
- ThemedDynamicCredentialsInput
- ThemedEmojiPicker
- ThemedFieldDisplayError
- ThemedFile
- ThemedFilePicker
- ThemedFontHandler
-
ThemedFontHandler is a helper class to generate a TextTheme with the
AppFont
of the app. - ThemedGridDelegateWithFixedHeight
- ThemedHumanizedDurationLanguage
- ThemedHumanizeLanguage
- ThemedHumanizeOptions
- ThemedIconPicker
- ThemedImage
- ThemedInputBorder
- ThemedInputLikeContainer
- ThemedLayout
- ThemedLicense
- ThemedLicensesView
- ThemedLicensesViewState
- ThemedMapButton
- ThemedMapController
- ThemedMapDragButton
- ThemedMapEvent
- ThemedMapEvent is the base class for all events in the map.
- ThemedMapToolbar
- ThemedMiniBar
- ThemedMonth
- ThemedMonthPicker
- ThemedMonthRangePicker
-
ThemedMultiSelectInput<
T> - ThemedNotificationIcon
- ThemedNotificationItem
- ThemedNumberInput
- ThemedOrm
- ThemedOrm is a helper component to handle Layrz Translations errors.
-
ThemedPageBuilder<
T> - ThemedPageTransition
- ThemedPlainCrs
- ThemedPlainProjection
-
ThemedRadioInput<
T> - ThemedScaffoldCell
-
ThemedScaffoldView<
T> - ThemedSearchInput
-
ThemedSelectInput<
T> -
ThemedSelectItem<
T> - ThemedSidebar
- ThemedSnackbar
- ThemedSnackbarMessenger
- ThemedSnackbarMessengerState
- ThemedStreetViewDialog
- ThemedTab
-
ThemedTable<
T> -
ThemedTableAction<
T> - ThemedTableAvatar
- ThemedTextInput
- ThemedTileLayer
- ThemedTimePicker
- ThemedTimeRangePicker
- ThemedTooltip
- WorkInProgressView
Enums
- ColorPickerType
- Enum that represents the different offered color picker types.
- EmojiGroup
- All Groups
- FileType
- LayoEmotions
- LayrzSupportedLanguage
- Month
- Sizes
- Sizes is enum
- ThemedButtonStyle
- ThemedButtonStyle is used to define the style of the button.
- ThemedCalendarMode
- ThemedCalendarMode is an enum that represents the different modes that the calendar can be displayed in.
- ThemedCheckboxInputStyle
- ThemedCheckboxInputStyle is the style of the checkbox.
- ThemedComboboxPosition
- ThemedComboboxPosition is the position of the combobox choices.
- ThemedLayoutStyle
- ThemedLayoutStyle is an enum that represents the layout style. The layout style can be dual, sidebar or mini.
- ThemedMapToolbarFlow
- ThemedMapToolbarFlow defines the flow of the toolbar.
- ThemedMobileLayoutStyle
- ThemedMobileLayoutStyle is an enum that represents the layout style. The layout style can be dual, sidebar or mini.
- ThemedNotificationLocation
- ThemedNotificationLocation defeines the location of the notification.
- ThemedPlatform
- ThemedPlatform is the platform of the app.
- ThemedSearchPosition
- ThemedSearchPosition is the position of the search input. Basically means the position of the search input when is active.
- ThemedSeparatorType
- ThemedTooltipPosition
- ThemedUnits
-
Units
of time. Defines each component of a Duration human readable.
Extensions
- ColorToJson on Color
- ColorToJson is an extension to convert a Color to a JSON string.
- DateTimeExtension on DateTime
- DateTimeExtension is an extension to extend the DateTime class.
- HumanizeDuration on Duration
- SizesExt on Sizes
- ThemedOrn on BuildContext
Constants
-
arabicDigits
→ const List<
String> - kAccentColor → const Color
- kAccentColor is the accent/alternative color of Layrz branding.
- kAppTitle → const String
- kAppTitle is the title of the app.
- kBottomBarHeight → const double
- kDarkBackgroundColor → const Color
- kDarkBackgroundColor is the background color of the app when Brightness.dark.
- kDarkSystemUiOverlayStyle → const SystemUiOverlayStyle
- kDefaultLayer → const MapLayer
- kDefaultLayer is the default layer for the map. Uses OpenStreetMap.
- kExtraSmallGrid → const double
- kExtraSmallGrid is the extra small grid size.
- kGoldenMHeadquarters → const LatLng
- kGoldenMHeadquarters is the default location for the map.
- kHoverDuration → const Duration
- kHoverDuration is the standard duration for animations.
- kLargeGrid → const double
- kLargeGrid is the large grid size.
- kLightBackgroundColor → const Color
- kLightBackgroundColor is the background color of the app when Brightness.light.
- kLightSystemUiOverlayStyle → const SystemUiOverlayStyle
- kLogoAspectRatio → const double
- kLogoHeight → const double
- kLogoWidth → const double
- kMaxZoom → const double
- kMaxZoom is the maximum zoom level for the map.
- kMediumGrid → const double
- kMediumGrid is the medium grid size.
- kMinZoom → const double
- kMinZoom is the minimum zoom level for the map.
- kPrimaryColor → const Color
- kPrimaryColor is the main color of Layrz branding.
- kSmallGrid → const double
- kSmallGrid is the small grid size.
- kSnackbarAnimationDuration → const Duration
-
unitMeasures
→ const Map<
ThemedUnits, int>
Properties
- globalMimeResolver → MimeTypeResolver
-
no setter
- kListViewPadding → EdgeInsets?
-
kListViewPadding is the suggested padding of the ListView widget.
Corrects the padding for iOS
no setter
- kThemedPlatform → ThemedPlatform
-
kThemedPlatform is the platform of the app.
no setter
Functions
-
debugCheckHasThemedSnackbarMessenger(
BuildContext context) → bool -
deleteConfirmationDialog(
{required BuildContext context, bool isMultiple = false, bool isLoading = false, bool isCooldown = false, VoidCallback? onCooldown}) → Future< bool> - Shows a dialog to confirm the deletion of items (Can be single or multiple) Requires the following translations:
-
drawAvatar(
{Avatar? dynamicAvatar, String? avatar, IconData? icon, String? name, double size = 30, double radius = 30, Color? color, double elevation = 1, Color? shadowColor, bool reverse = false, required BuildContext context}) → Widget - drawAvatar is a helper function to generate a CircleAvatar using the avatar and the name (as failover) of the entity.
-
generateContainerElevation(
{required BuildContext context, int elevation = 1, double radius = 10, Color? color, Color? shadowColor, bool reverse = false}) → BoxDecoration - generateContainerElevation is a helper generator for the BoxDecoration of the Container widget.
-
generateDarkTheme(
{String theme = "CUSTOM", Color mainColor = kPrimaryColor, AppFont? titleFont, AppFont? bodyFont}) → ThemeData - generateDarkTheme is a helper function to generate a ThemeData with the Brightness.dark theme. Will receive the following arguments:
-
generateLightTheme(
{String theme = "CUSTOM", Color mainColor = kPrimaryColor, AppFont? titleFont, AppFont? bodyFont}) → ThemeData - generateLightTheme is a helper function to generate a ThemeData with the Brightness.light theme. Will receive the following arguments:
-
generateSwatch(
{required Color color, bool withShader = false}) → MaterialColor - generateSwatch is a helper function to generate a swatch from a color.
-
getAccentColor(
{Color? accent}) → Color - getAccentColor is a helper function to get the accent color of the app.
-
getImage(
String path, {double height = 30, double width = 100, BoxFit fit = BoxFit.contain, FilterQuality filterQuality = FilterQuality.medium, ImageProvider< Object> ? customProvider, Key? key}) → Widget - getImage is a helper function to get an image from a local file path, a network url or a base64 string.
-
getPrimaryColor(
{Color? primary}) → Color - getPrimaryColor is a helper function to get the primary color of the app.
-
getThemeColor(
{required String theme, Color color = kPrimaryColor}) → MaterialColor - getThemeColor is a helper function to get the theme color of the app.
-
kThemedTableCanTrue(
BuildContext context, dynamic item) → bool -
openInfoDialog(
{required BuildContext context, required String appTitle, required LayrzAppLocalizations? i18n, required String logo, required String companyName}) → void - openInfoDialog is a helper function to open an info dialog using the structure of Layrz.
-
overrideAppBarStyle(
{required bool isDark}) → void - overrideAppBarStyle overrides the app bar style. This should be used only when the theme changes from light to dark or vice versa.
-
parseFileToBase64(
ThemedFile file) → Future< Map< String, String> ?> - parseFileToBase64 is a helper function to parse a file to base64. Will return a Map with the keys:
-
parseFileToByteArray(
ThemedFile file) → Future< List< int> > -
parseBase64ToFile
is a helper function to parse a base64 string to a file. Will return a List<int> and will receive afile
asPlatformFile
instance -
pickFile(
{String? pickDialogTitle, LayrzAppLocalizations? i18n, FileType type = FileType.any, List< String> ? allowedExtensions, bool allowMultiple = false}) → Future<List< ThemedFile> ?> - pickFile is a helper function to pick a file from the device.
-
saveFile(
{required String filename, required Uint8List bytes, String? saveDialogTitle, LayrzAppLocalizations? i18n}) → Future< ThemedFile?> - saveFile is a helper function to save a file to the device.
-
showThemedAboutDialog(
{required BuildContext context, String companyName = 'Golden M, Inc,', String? version, AppThemedAsset? logo}) → void -
subdivideLayersPerSource(
{required List< MapLayer> rawLayers}) → List<MapLayer> -
subdivideLayersPerSource takes a list of
MapLayer
and returns a list ofMapLayer
where each layer has only one source. -
useBlack(
{required Color color, double tolerance = 0.5}) → bool -
useBlack is a helper function to detect if the color should have the content
with
Colors.White
or Colors.black color. Will return a bool indicating if the color should beColors.White
or Colors.black. -
validateColor(
{required Color color}) → Color -
useBlack is a helper function to detect if the color should have the content
with
Colors.White
or Colors.black color. Will return a Color indicating if the color.
Typedefs
-
CellColor<
T> = Color? Function(T item) - CellColor<T> defines the color of the cell.
-
CellTap<
T> = void Function(T item) - CellTap<T> defines the action when the cell is tapped.
-
CredentialOnChanged
= void Function(Map<
String, dynamic> ) - EmojiTapCallback = void Function(Emoji emoji)
- IconDataTapCallback = void Function(IconData icon)
- OnSearch = void Function(String value)
- ThemedDynamicAvatarOnChanged = void Function(AvatarInput? value)
- ThemedMapButtonDragCallback = void Function(Offset offset)
- ThemedMapButtonDragNullCallback = void Function(Offset? offset)
- ThemedMapControllerListener = void Function(ThemedMapEvent event)
- ThemedSnackbarCallback = bool Function()
-
ValueBuilder<
T> = String Function(BuildContext context, T item) - ValueBuilder<T> defines the value to display in a column.
-
WidgetBuilder<
T> = Widget Function(BuildContext context, T item) - WidgetBuilder<T> defines the widget to display in a column.