effectiveGridDirection method

TextDirection effectiveGridDirection(
  1. BuildContext context
)

The effective direction for the assets grid. 网格实际的方向

By default, the direction will be reversed if it's iOS/macOS. 默认情况下,在 iOS/macOS 上方向会反向。

Implementation

TextDirection effectiveGridDirection(BuildContext context) {
  final TextDirection od = Directionality.of(context);
  if (effectiveShouldRevertGrid(context)) {
    if (od == TextDirection.ltr) {
      return TextDirection.rtl;
    }
    return TextDirection.ltr;
  }
  return od;
}