Files
alan 9551eceaed Complete Material-only APIs and fixtures
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
2026-11-11 21:55:39 +00:00

17 lines
664 B
Dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
/// Whether this runs on a desktop platform (macOS, Linux, Windows),
/// including a desktop browser. Hover and click targets there hug their
/// content; phones and tablets keep full-width touch rows. Uses the device's
/// platform, not the theme's: web themes are pinned to Android.
bool prefersCompactHitTargets(BuildContext context) =>
switch (defaultTargetPlatform) {
TargetPlatform.macOS ||
TargetPlatform.linux ||
TargetPlatform.windows => true,
TargetPlatform.android ||
TargetPlatform.iOS ||
TargetPlatform.fuchsia => false,
};