Skip to content

1.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Nov 03:03
1484a08

Added

  • The confirm label takes its colour from the view config (#327, #330). MagicFeedback.confirm rendered its action label with a hardcoded text-white, and the label's own text colour wins over the button box's, so an app with a light button_confirm_class got a white label on a light button. The label now reads view.confirm.button_confirm_text_class, or view.confirm.button_danger_text_class when isDangerous. Both default to text-white: dropping the class instead would have turned every default blue and red button's label dark. (lib/config/view.dart, lib/src/ui/magic_feedback.dart, doc/basics/ui-helpers.md)

Fixed

  • view.snackbar.position, view.dialog.barrier_dismissible, view.dialog.barrier_color and view.loading.barrier_class now do what the default config says (#328, #330). Nothing in lib/ read them: the barrier was a hardcoded Colors.black54 and the confirm dialog always closed on a barrier tap. A snackbar now shows at the top when the position is 'top' (toasts stay at the bottom); Magic.dialog and Magic.confirm read the dismissible flag, and an explicit Magic.dialog(barrierDismissible:) still wins, so its parameter is now a nullable bool? defaulting to the config; the dialog, confirm and loading barriers resolve the bg-* colour of their className through WindParser against the app's WindTheme, so dark: peers apply. A className without a background colour hands the choice back to showDialog, which all three overlays use: the app's dialog theme barrierColor (an ambient DialogTheme, then ThemeData.dialogTheme), and Colors.black54 when neither sets one. The default dialog, confirm and loading barrier moves from Colors.black54 (alpha 0.54) to the configured bg-black/50 (alpha 0.50), with a dark:bg-black/70 peer. (lib/src/ui/magic_feedback.dart, lib/src/foundation/magic.dart, doc/basics/ui-helpers.md)
  • The default feedback styles follow dark mode (#329, #330). Every neutral colour in defaultViewConfig was light-only, so a dark app got white dialog, confirm and loading panels. Each now carries its dark: peer: bg-white dark:bg-gray-900 panels, text-gray-900 dark:text-gray-100 titles, text-gray-600 dark:text-gray-400 messages and cancel label, a dark:bg-gray-700 toast and a bg-black/50 dark:bg-black/70 barrier. The saturated status fills (bg-green-500 text-white and the like) read the same in both modes and stay. The dialog, confirm, loading and toast fallbacks MagicFeedback uses when no view config is loaded match the defaults, which also replaces the dialog fallback's stray bg-red-100 with the configured bg-white; the snackbar fallback stays a neutral bg-gray-900 for every type rather than the configured per-type colours. (lib/config/view.dart, lib/src/ui/magic_feedback.dart, doc/basics/ui-helpers.md)

Removed

  • The pub.dev listing no longer carries the Magic logo as a screenshot. dart.dev asks for no logos or branding imagery under the pubspec screenshots field, so the entry, screenshots/magic-logo.png and the WebP tools step publish.yml ran for pana are gone. The README still opens with the logo. (pubspec.yaml, screenshots/, .github/workflows/publish.yml)