Skip to content

refactor: replace MediaQuery calls with reactive signals#227

Open
JohanScheepers wants to merge 4 commits intothingsboard:masterfrom
JohanScheepers:refactor/signals-media-query-migration
Open

refactor: replace MediaQuery calls with reactive signals#227
JohanScheepers wants to merge 4 commits intothingsboard:masterfrom
JohanScheepers:refactor/signals-media-query-migration

Conversation

@JohanScheepers
Copy link

Migrated multiple widgets to use signals_flutter for layout-related updates (screen size, view insets, orientation). This improves performance by allowing granular rebuilds instead of full widget tree updates.

  • Added shortestSideSignal, isMobileSignal, and orientationSignal to lib/utils/signals/app_signals.dart.
  • Replaced MediaQuery.sizeOf, MediaQuery.viewInsetsOf, and MediaQuery.paddingOf with their respective signal watch(context) equivalents in:
    • AlarmAssigneeListWidget
    • AssigneeListWidget
    • AlarmDetailsContentWidget
    • TypesListWidget
    • PaginationGridWidget
    • DashboardWidget
    • TbAppBar
    • LoginWidget
  • Resolved naming conflicts for AsyncLoading in LoginWidget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant