~cytrogen/fluent-reader-mobile

ref: fb03e4e34b01586cb1fcdf559950f76ed3c4d9ac fluent-reader-mobile/lib/components/responsive_action_sheet.dart -rw-r--r-- 516 bytes
fb03e4e3 — Bruce Liu fix android 11 testfield error #1 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import 'package:fluent_reader_lite/utils/global.dart';
import 'package:flutter/cupertino.dart';

class ResponsiveActionSheet extends StatelessWidget {
  final Widget child;

  ResponsiveActionSheet(this.child);

  @override
  Widget build(BuildContext context) {
    if (!Global.isTablet) return child;
    return Row(
      mainAxisAlignment: MainAxisAlignment.start,
      children: [
        Container(
          constraints: BoxConstraints(maxWidth: 320),
          child: child,
        )
      ],
    );
  }
}