widgets_easier library

Widgets Easier: a collection of pre-built UI components inspired by Element Plus.

Importing this library gives you every component. Narrower barrels are available if you prefer to import only what you use: theme.dart, basics.dart, navigation.dart, feedback.dart, form.dart, data.dart.

Classes

AnimateStyles
A small set of entrance animations used internally by Widgets Easier.
BasicShadow
BorderWrapper
BottomSheets
Platform: mobile. Sheets that slide up from the bottom edge.
ButtonGroup
A widget that displays a group of buttons in a row.
CascadeBottomSheet
Platform: mobile. Picks a path level by level in a bottom sheet.
CheckTag
A tag that behaves like a checkbox.
ConfirmDialog
ConfirmDialogs
CounterInput
A numeric field flanked by a decrement and an increment button.
CounterInputController
Holds the numeric value of a CounterInput and keeps the text shown in its field in sync with that value.
DarkShadow
DashedBorder
DecimalTextInputFormatter
Restricts input to a decimal number, optionally signed.
DottedBorder
DottedDashBorder
DoubleBorder
FutureDialogs
GrooveBorder
Two bevels back to back, carving a channel into the surface: the outer half is lit like an InsetBorder, the inner half like an OutsetBorder. Equivalent to the CSS border-style: groove.
HeartBorder
InfoDialog
InfoDialogs
InsetBorder
A bevelled frame lit from the bottom right, so the box looks pressed into the surface. Equivalent to the CSS border-style: inset.
LighterShadow
LightShadow
ListComponent
ListContent
ListItem
LoadingDialogs
Fullscreen loading overlay. Use WeLoading.service instead.
NotificationMessage
一个消息吐丝单元,用于显示具体的Toast消息
NotifyToasts
Corner notifications. Superseded by WeNotification, which reads its colours from WeTheme, stacks per corner and returns a handle:
OutlinePainter
Painter class used to draw the outline of the button based on the specified style.
OutsetBorder
A bevelled frame lit from the top left, so the box looks raised off the surface. Equivalent to the CSS border-style: outset.
PaginatedResponse<T>
表示一个带分页信息的API响应
PaginationLoadingController<T>
管理分页加载的控制器。
PaginationView<T>
一个用于显示分页数据的视图组件。
PaginationViewDelegate<T>
提供 PaginationView UI组件的委托。
PercentIndicator
Picture
ProtectBorder
RectSliderValueIndicatorShape
RidgeBorder
Two bevels back to back, raising a ridge off the surface: the outer half is lit like an OutsetBorder, the inner half like an InsetBorder. Equivalent to the CSS border-style: ridge.
RoundedRectSliderTrackShape
SemanticButton
A button widget that can be styled semantically based on the application's design system.
SemanticColors
Static access to the default light palette.
SliderWidget
SlidingCaptcha
滑动拼图验证码。
SolidBorder
SolidStarBorder
Tag
TipToasts
WeAlert
A persistent inline notice, after el-alert.
WeAvatar
A user or entity picture with text and icon fallbacks, after el-avatar.
WeAvatarGroup
A row of overlapping WeAvatars with a +N overflow, after el-avatar stacks seen in team headers.
WeBadge
A count or dot pinned to the corner of child, after el-badge.
WeBevelBorder
A rectangular ShapeBorder that fakes depth by painting two of its sides light and two dark, matching the CSS inset, outset, groove and ridge border styles.
WeBreadcrumb
A location trail, after el-breadcrumb.
WeBreadcrumbItem
One crumb of a WeBreadcrumb.
WeButton
A button that follows the Element Plus button model: a semantic type, a fill variant, three sizes, and round / circle / loading / disabled states, all painted from WeTheme tokens.
WeButtonGroup
A row of WeButtons fused into one control, after el-button-group.
WeCalendar
A month board for schedules and bookings, after el-calendar.
WeCalendarDay
A day as WeCalendar.cellBuilder sees it.
WeCalendarEvent
Something that happens on a day of a WeCalendar.
WeCaptcha
A slide-to-fit puzzle captcha, the kind used to gate risky actions.
WeCaptchaController
Drives a WeCaptcha from the outside.
WeCard
A bordered surface with an optional header and footer, after el-card.
WeCarousel
A looping gallery after el-carousel.
WeCascader<T>
A dropdown that picks one path from a tree, after el-cascader.
WeCascaderOption<T>
A node of a WeCascader tree.
WeCheckbox
A tick box with a label, after el-checkbox.
WeCheckboxGroup<T>
Several WeCheckboxes bound to one set of values, after el-checkbox-group.
WeCollapse
An accordion of titled panels, after el-collapse.
WeCollapseItem
One panel of a WeCollapse.
WeColorScheme
The colour design tokens of Widgets Easier.
WeColumn<T>
One column of a WeTable.
WeControlSize
Dimensions of a single control size step (large / default / small).
WeDateLocale
The words and conventions a calendar speaks.
WeDatePanel
A compact calendar for picking a day or a range of days, after the panel of el-date-picker.
WeDatePicker
A date field with a drop-down calendar, after el-date-picker.
WeDateSheet
Picks a day, or a range of days, from a sheet that slides up from the bottom, with a WeDateWheel inside.
WeDateShortcut<T>
A one-click preset beside a WeDatePicker's panel, such as "Today" or "Last 7 days". value runs when the preset is clicked, so relative presets stay correct however long the page has been open.
WeDateWheel
Spinning columns for year, month and day, the way phones pick a date.
WeDescriptionItem
One label/value pair of a WeDescriptions.
WeDescriptions
A grid of labelled values for showing one record, after el-descriptions.
WeDialog
A web-style modal after el-dialog.
WeDialogDragHandle
Makes child drag the dialog it belongs to.
WeDialogDragScope
Hands the drag callbacks of a WeMovableDialog down to its header.
WeDivider
A separator line with an optional caption, after el-divider.
WeDrawer
A panel sliding in from a screen edge, after el-drawer. Open it with WeDrawer.show; the widget itself is the panel, for custom routes.
WeDropdown<T>
A trigger that opens a list of actions, after el-dropdown.
WeDropdownItem<T>
One choice of a WeDropdown.
WeEmpty
A placeholder for a region with nothing to show, after el-empty.
WeFieldBox
The outlined box behind dropdown fields such as WeSelect, WeCascader and WeTreeSelect: border, hover, focus glow, a clear button that replaces the arrow on hover, and the error state and size of a surrounding WeFormItem.
WeForm
A form layout with validation, after el-form.
WeFormController
Drives a WeForm from outside: validate, reset, scroll to a field.
WeFormItem
One labelled, validated field of a WeForm, after el-form-item.
WeFormItemState
The state of a WeFormItem; fields reach it through WeFormItem.maybeOf.
WeFormScope
Layout settings a WeForm hands down to its items.
WeIcons
The bundled status icons, tinted with a semantic colour.
WeImage
A framed image after el-image: a placeholder while loading, a fallback on error, and an optional click-to-preview.
WeImageSource
One image that WeImageViewer can show.
WeImageViewer
Full-screen image preview after el-image-viewer.
WeInput
A single-line text field styled like el-input, with prefix / suffix icons, a clear button and three sizes.
Inline hyperlink text, after el-link.
WeLoading
A loading mask over a region or the whole screen, after Element Plus's v-loading.
WeLoadingHandle
Closes one fullscreen WeLoading.service overlay. Closing twice is a no-op.
WeMenu
A vertical navigation menu, after el-menu in vertical mode.
WeMenuEntry
One entry of a WeMenu: an item, a sub-menu or a group title.
WeMenuGroup
A titled run of entries, after el-menu-item-group.
WeMenuItem
A selectable leaf, after el-menu-item.
WeMessage
A global, transient message that drops in from the top centre and stacks below earlier ones, after ElMessage.
WeMessageBox
The three ready-made modals of ElMessageBox: alert, confirm and prompt.
WeMovableDialog
Positions a dialog and lets the user drag it around by its header.
WeNotification
A titled card in a screen corner that stacks with its neighbours, after ElNotification. Use it for events the user did not just trigger, such as a finished export or a failed sync; WeMessage is for direct feedback.
WeNotificationHandle
Closes one notification early or waits for it to go.
WePageHeader
A page title row after el-page-header.
WePagination
Page controls for a list, after el-pagination.
WePlatform
Platform checks shared by the components.
WePopconfirm
A small confirmation bubble anchored to the action it guards, after Element Plus's el-popconfirm.
WePopover
A floating card with an optional title, after Element Plus's el-popover. Unlike WeTooltip it can hold any widget, and by default opens on click.
WePopper
Floats popupBuilder next to its trigger, the shared base of tooltips, popovers, popconfirms and select panels.
WePopperController
Opens and closes a WePopper from outside.
WePopperStyle
The panel chrome of a WePopper; null fields fall back to WeTheme.
WeProgress
A progress indicator with Element Plus' three shapes and status colours, after el-progress.
WeRadioGroup<T>
A single-select group, after el-radio-group.
WeRadioOption<T>
One choice of a WeRadioGroup.
WeRadiusScheme
Corner radius tokens.
WeRate
A row of stars for scoring, after el-rate.
WeResult
The outcome of an operation, centred with a big icon, after el-result.
WeRule
One validation rule of a WeFormItem, after async-validator rules used by el-form.
WeSegmented<T>
A single-select control where the options sit side by side and the active one is raised, after el-segmented.
WeSegmentedOption<T>
One choice of a WeSegmented.
WeSelect<T>
A picker with a drop-down list, after el-select.
WeSelectGroup<T>
A titled group of options, after el-option-group.
WeSelectOption<T>
One choice of a WeSelect.
WeShadowScheme
Elevation tokens, mirroring Element Plus' --el-box-shadow* variables.
WeSizeScheme
Size design tokens: one WeControlSize per SizeEnum step, for regular controls (buttons, inputs, selects) and for compact ones (tags, badges).
WeSkeleton
Grey placeholder blocks shown while content loads, after el-skeleton.
WeSlider
A themed slider after el-slider.
WeSliderMark
A labelled stop on a WeSlider track.
WeSpacingScheme
Spacing scale tokens.
WeStatistic
A labelled number with optional prefix, suffix and trend, after el-statistic.
WeStep
One step of a WeSteps.
WeSteps
A progress indicator for a multi-step flow, after el-steps.
WeSubMenu
A collapsible node with nested children, after el-sub-menu.
WeSwitch
An on/off toggle, after el-switch.
WeTab
One tab of a WeTabs.
WeTabbar
The row of destinations along the bottom of a phone app.
WeTabbarItem
One destination of a WeTabbar.
WeTable<T>
A data table with typed columns, row selection, striping, hover, sorting and an empty state, after el-table.
WeTabs
A tab strip with optional pane content, after el-tabs.
WeText
Body text tied to the theme's text ramp and semantic colours, after el-text.
WeTheme
The design tokens used by every Widgets Easier component.
WeTimeline
A vertical list of dated events, after el-timeline.
WeTimelineItem
One event of a WeTimeline.
WeTooltip
A short hint shown while the pointer rests on child, after Element Plus's el-tooltip.
WeTree<T>
A collapsible tree with selection, linked checkboxes, lazy loading and filtering, after el-tree.
WeTreeNode<T>
A node of a WeTree.
WeTreeSelect<T>
A dropdown that picks from a WeTree, after el-tree-select.
WeUpload
A file uploader after el-upload, with no native dependency: the app supplies picker (e.g. through file_picker) and uploader (e.g. through dio), and the widget handles checks, the list, progress, retries and removal.
WeUploadController
Holds the files of a WeUpload and drives it from outside.
WeUploadFile
A file in a WeUpload list.
WinCloseButton
The square close button of a window title bar, red on hover.
WinDialogBody
The message area of a WinStyleDialog: a large icon beside the text, with room for extra content underneath.
WinDialogs
Shows WinStyleDialogs.
WinStyleDialog
A desktop-looking dialog: title bar, message area, command bar.
WinStyleDialogHeader
The title bar of a WinStyleDialog: icon, title, close button.
WinStyleInfoDialogFooter
The command bar of a WinStyleDialog: a tinted strip with right-aligned buttons, the way desktop dialogs lay them out.
Write

Enums

BorderDotShape
EffectEnum
ListType
NotifyToastPosition
OutlineStyle
An enumeration representing different styles for outlining a shape.
SemanticEnum
SizeEnum
TagThemeEnum
TipToastPosition
TooltipPlacement
WeAlertEffect
Fill style of a WeAlert, after el-alert effect.
WeAvatarShape
Shape of a WeAvatar.
WeBevelStyle
The way a WeBevelBorder fakes depth by lighting two of its sides.
WeButtonVariant
How a WeButton is filled, after Element Plus' el-button variants.
WeCalendarView
Which grid a calendar is showing: days of a month, months of a year, or years of a decade.
WeCaptchaStatus
What the captcha is currently doing.
WeCardShadow
When a WeCard shows its drop shadow, after el-card shadow.
WeCarouselArrow
WeCarouselIndicator
WeCarouselType
WeCascaderTrigger
What opens the next column of a WeCascader.
WeDatePickerTouchMode
What a WeDatePicker opens on touch.
WeDateWheelType
Which columns a WeDateWheel shows.
WeDividerAlign
Where the caption of a horizontal WeDivider sits.
WeDrawerDirection
Which edge a WeDrawer slides in from, after el-drawer's direction.
WeInteraction
How the user drives the app, which decides control sizes and whether hover triggers work. Set it on WeTheme.interaction.
WeLabelPosition
Where a WeFormItem puts its label, after label-position.
WeNotificationPosition
Corner a WeNotification slides in from.
WePlacement
Where a floating panel sits relative to its trigger, after Element Plus's placement.
WePlatformFit
Which platform a component is designed for. The gallery and the docs label every component with one of these.
WePopperTrigger
What opens a WePopper.
WeProgressType
Shape of a WeProgress.
WeRadioStyle
How a WeRadioGroup draws its options.
WeRuleTrigger
When a WeRule runs on its own. Every rule also runs on WeFormController.validate.
WeStepStatus
The state of one step in WeSteps.
WeTabsType
Visual style of a WeTabs header, after el-tabs type.
WeTextRole
Text roles of WeText, mapped onto the theme's text colours.
WeTooltipEffect
Colour scheme of a WeTooltip, after Element Plus's effect.
WeUploadListType
How WeUpload lists its files.
WeUploadReject
Why WeUpload refused a picked file.
WeUploadStatus
Where a WeUploadFile is in its upload.

Extensions

SemanticEnumColors on SemanticEnum
Colour helpers on SemanticEnum.
WeColorShades on WeColorScheme
Element Plus derives nine tints of every semantic colour (--el-color-primary-light-3 … light-9) plus one shade (--el-color-primary-dark-2) and uses them for hover states, plain buttons, light tags and alert backgrounds.
WeThemeContext on BuildContext
Convenience accessors on BuildContext.

Functions

findStatusColor(SemanticEnum type) → Color
Returns the colour of type in the default light palette.
weFormatBytes(int bytes) → String
1536 → 1.5 KB.
weFormatDate(DateTime d, [String pattern = 'yyyy-MM-dd']) → String
Formats d with a small pattern language: yyyy, MM / M, dd / d; anything else is copied as is, so yyyy年M月d日 works too.
weParseDate(String text, [String pattern = 'yyyy-MM-dd']) → DateTime?
Reads what a user typed back into a date, or null if it is not one.

Typedefs

AnimateStyleBuilder = AnimatedWidget Function(Animation<double> animation, Widget child)
Signature for an entrance-animation builder used by toasts and dialogs.
CounterInputChanged = void Function(double oldValue, double newValue)
Signature for the value callbacks of a CounterInput.
Iocns = WeIcons
Legacy misspelled name of WeIcons, kept for source compatibility.
TransitionFunction = Widget Function(Animation<double>, Widget)
WeCascaderFilter<T> = bool Function(String query, List<WeCascaderOption<T>> path)
Decides whether a whole path matches the search text.
WeSelectFilter<T> = bool Function(String query, WeSelectOption<T> option)
Decides whether option matches what the user typed.
WeSelectRemote<T> = Future<List<WeSelectOption<T>>> Function(String query)
Loads the options for query from somewhere else, e.g. a search API.
WeTreeFilter<T> = bool Function(String query, WeTreeNode<T> node)
Replaces the default "label contains the query" match of a filtered tree.
WeUploader = Future<Object?> Function(WeUploadFile file, ValueChanged<double> onProgress)
Uploads file, reporting 0–1 through onProgress. The returned value becomes WeUploadFile.response; throwing marks the file failed.
WeUploadPicker = Future<List<WeUploadFile>> Function(bool multiple)
Opens a file chooser and returns what the user picked.
WeValidator = FutureOr<String?> Function(Object? value)
A custom check: return an error message, or null when the value is fine. May be async, e.g. to ask a server whether a name is taken.