prf_design 1.1.0
prf_design: ^1.1.0 copied to clipboard
PRF Design System - Shared widgets, theme system, and essential utilities.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.0 - 2026-10-14 #
Added #
StatusColorSet.foreground— AA-safe text/icon colour for content sitting on a statusbackgroundtint (falls back tomainwhen not supplied).PRFStatusExtension.allandPRFStatusExtension.onColorFor(fill), which returns the matching set'sonColoror the more legible of white/navy900.PRFStatusBadge.foregroundColoroverride.- Accessible status tones in
PRFColors:warningText,orangeText,emeraldText,blueDark, and dark-modesuccessBright,errorBright,infoBright,blueBright. - Component themes for checkbox, radio, switch, tab bar, list tile, tooltip and floating action button, with padded 48dp tap targets.
- Contrast regression test (
test/theme/contrast_test.dart) asserting WCAG AA for every status set and key colour-scheme pair in light and dark. PRFButtonVariant.outlinedandPRFButtonVariant.textfor secondary and low-emphasis actions, an optional leadingPRFButton.icon, andPRFButton.fullWidth(setfalsefor compact inline buttons that still keep a 48dp target).PRFStatPill— compact value + label pill for header stats, with optional icon andonPrimary/containertones; respects system text scaling.PRFListItemCard— adaptive list row card (icon tile, title, subtitle, active/inactive status, labelled 48dp delete action).PRFNavBarAction— labelled 48dp header action forPRFBrandedNavBar(primaryandneutralvariants).PRFErrorView.inline— inline error with a labelled "Try again" button for use inside lists and sections;titleandretryLabelon all constructors.showPRFMediaSourceSheet/PRFMediaSourceSheet— camera, gallery and file picker sheet with large labelled options (PRFMediaSource,PRFMediaSourceLabels).PRFSyncStatusBar— presentational upload/sync status bar (PRFSyncStatussynced, pending, syncing, failed) with retry and progress semantics.PRFDomainTabSectionnow owns itsTabControllerand acceptsinitialIndex,onTabChangedand an optionalsubtitle.PRFSearchableListtablet variant.- Optional localisable labels:
PRFSearchableList.clearSelectionTooltip,PRFReplyComposer.sendTooltip,PRFMediaTile.videoLabel,PRFBrandedNavBar.backLabel,PRFTimelineDateBadge.onStatusColor.
Changed #
- Status colours now meet WCAG AA (4.5:1) in both brightnesses. Light-mode
success, completed, info, initiated and ignored fills are darker; orange
(pending/scheduled) and emerald (in progress) fills now pair with navy900
text instead of white; dark-mode fills use bright tones with navy900 text.
Widgets placing text on
statusColors.*.mainshould use.onColor. - Enabled input, unselected checkbox/radio and switch-track borders now reach 3:1 against their fill (WCAG 1.4.11). Dividers are unchanged.
PRFFormFieldLabellabel and "(optional)" text usecolorScheme.onSurfaceVariant, passing AA and adapting to dark mode.- Light snackbar text and action colours derive from
colorScheme.onPrimary. PRFColorsExtensiondocuments which brand colours are fill-only on dark surfaces.- Buttons, category chips, navbar titles, bottom-sheet titles, reply status and timeline badges grow with the system text size instead of clipping.
- Every icon-only control has a tooltip and screen-reader label (back, close, send, clear, retry); the searchable-list clear action is a 48dp button.
PRFButtonexposes its label on the tappable semantics node.PRFActionCardandPRFNavigationTileannounce as buttons;PRFActionCardno longer paints white blocks in dark mode.PRFErrorViewuses plain-language titles (e.g. "No internet connection"), scrolls at large text sizes and no longer reads text twice.- All animations route through
PRFMotionTokens.resolve; the media grid stagger is capped at 400ms. - Widgets use
PRFSizeTokens,PRFOpacitiesandPRFShadowTokensinstead of raw values; some disabled and overlay opacities shift slightly. PRFBrandedNavBarheight usesPRFNavigationTokens.brandedNavBarHeight.DeviceHelperclassifies devices withPRFBreakpoints(desktop now starts at 1024dp, matchingPRFAdaptive); text no longer shrinks from tablet to desktop widths, and narrow phones keeplabelSmallat 11sp or larger.PRFDomainTabSection.subtitleis now nullable.
Removed #
- The unused Lato font family (692 KB). Manrope is the sole typeface.
1.0.8 - 2026-08-22 #
Changed #
- Downgraded
phone_form_fieldfrom^11.0.1to^10.0.18and removed thematerial_uidependency. v11 builds on the standalonematerial_uipackage whose widgets resolve separate Material/Theme/MaterialLocalizations classes, which crashed with "No Material widget found" / "No MaterialLocalizations found" whenPRFPhoneInputwas rendered inside hosts providing only Flutter's widgets (e.g.showModalBottomSheet). v10 is the last major built on the framework's own Material library and needs no workarounds.
1.0.7 - 2026-08-22 #
Added #
PRFOpacities— shared opacity steps for tinted overlays, borders, glows and disabled content (faint,subtle,hairline,muted,glow,accent,half,prominent,high,stronger,nearOpaque), exported from the tokens barrel.
1.0.3 - 2026-08-22 #
Added #
- New
layoutswidget category, exported from the main widgets barrel. PRFTabletSplitScaffold— canonical tablet geometry for list/detail screens: centered max-width stage with a content column and side panel column separated by a hairline divider (configurable flex weights and max width).PRFBrandPanel— navy "Living Root" side panel used on tablet split screens, with root-motif painting behind an optionally scrollable body.PRFTabletHeaderRow— tablet screen header with back navigation, an ellipsizing title, an optional inline loading spinner slot, and trailing actions.
Changed #
PRFTimelineMissionCardnow uses anInkWellfor tap ripple feedback instead of a bareGestureDetector.PRFTimelineMissionCardexposesSemantics(button role, school/status label, action hint) for accessibility.- Capacity info chip on
PRFTimelineMissionCardusescolorScheme.primary.
1.0.2 - 2026-08-06 #
Added #
PRFAdaptive+PRFBreakpointsadaptive layer, replacingflutter_adaptive_ui.- Unified
PRFButton(primary/secondary/destructive/google variants). - Unified
PRFTextField(text/email/name/number/password/textArea types). PRFPdfViewertaking decodedUint8Listbytes (no network I/O in the package).- Offline Manrope/Lato fonts declared as Flutter font assets.
Changed #
- Rewritten
PRFColorsas the single source of truth for every hex value (brand anchors, navy/lime 10-stop palettes, grays, status, accents). PRFThemenow uses a hand-authored Material 3ColorSchemeper brightness; droppedPRFThemeConfigand index-flipping palettes.PRFTheme.light/darkaccept optionalcolors:(PRFBaseColors, scheme derived from Material 3 tonal palettes) andcolorScheme:(full override) so consuming apps can bring their own palette.- Token values re-based on a 4px spacing grid and fixed radius scale.
PRFMediaCarouselcopy (tooltips, image error text) is now parameterized.PRFPhoneInputaccepts acountrieslist (defaults to Kenya).- Button and input widgets consolidated from per-variant folders into a single adaptive implementation.
Removed #
- Dependencies:
flutter_adaptive_ui,google_fonts,http. - Widgets with no consumers:
ImagePreviewPage,AnimatedStatCard,StatHighlightCard. - Backwards-compatible wrapper widgets:
PRFPrimaryButton,PRFSecondaryButton,PRFDestroyButton,PRFGoogleAuthButton,PRFTextInput,PRFEmailInput,PRFNameInput,PRFNumberInput,PRFPasswordInput,PRFTextAreaInput— usePRFButton/PRFTextFielddirectly (seedocs/migration_guide.md). PRFThemeConfig,PRFTextTheme.getErrorTextStyle/getSuccessTextStyle/getWarningTextStyle/getInfoTextStyle/getCaptionTextStyle.
0.4.0 - 2026-03-12 #
Changed #
- Breaking:
PRFTheme.lightandPRFTheme.darknow require an explicitscaleFactor. - Breaking:
PRFTextThemeAPIs now require an explicitscaleFactorand no longer acceptBuildContext.
Migration #
// Before
theme: PRFTheme.light(context)
darkTheme: PRFTheme.dark(context)
// After
theme: PRFTheme.light(
scaleFactor: DeviceHelper.getScaleFactor(context: context),
)
darkTheme: PRFTheme.dark(
scaleFactor: DeviceHelper.getScaleFactor(context: context),
)
// Before
PRFTextTheme.getButtonTextStyle(context)
PRFTextTheme.getErrorTextStyle(context)
// After
PRFTextTheme.getButtonTextStyle(scaleFactor: 1)
PRFTextTheme.getErrorTextStyle(scaleFactor: 1)
0.3.0 - 2026-02-11 #
Added #
PRFSnackbarunified snackbar helper with typed variants (error,success,info,warning).PRFSnackbarTypeenum for snackbar category styling.
Changed #
- Replaced
PRFErrorSnackbarwithPRFSnackbarfor broader snackbar support beyond errors. - Removed
publish_tofield from pubspec.yaml (defaults to pub.dev). - Release workflow now triggers on push to main (when pubspec.yaml changes) and via manual dispatch.
0.2.0 - 2026-02-11 #
Added #
- CI workflow for automated format, analysis, and test checks.
- Release workflow for automated pub.dev publishing and GitHub Releases.
- MIT License, CHANGELOG, and .gitignore.
- Package metadata:
repository,homepage,issue_trackerin pubspec.yaml.
Changed #
- Configured package for pub.dev distribution.
0.1.0 - 2026-02-11 #
Added #
- Theme System: PRFTheme (light/dark), PRFColors, PRFColorPalette, PRFColorsExtension, PRFStatusExtension, PRFTextTheme with Google Fonts (Lato).
- Widgets: PRFPrimaryButton, PRFSecondaryButton, PRFDestroyButton, GoogleAuthButton, PRFEmailInput, PRFPasswordInput, PRFTextInput, FormFieldLabel, PRFCircularProgressIndicator, PRFLinearProgressIndicator, PRFEmptyView, PRFErrorView, PRFErrorSnackbar, PRFCategoryChips, ImagePreviewPage, ReplyStatusView, AnimatedStatCard, StatHighlightCard, PDFViewerPage, WrappedPageIndicator.
- Utilities: DeviceHelper, Debouncer, DateFormatter, NumberFormatter, StringFormatter.
- Models: PRFFailure, PRFErrorType, PRFErrorSeverity.