~cytrogen/fluent-reader-mobile

ref: 2f8d3710d368f61ea1ffd02396e04ac291c3f4cc fluent-reader-mobile/lib/components/responsive_action_sheet.dart -rw-r--r-- 516 bytes
2f8d3710 — Bruce Liu update packages and use uri for http 4 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,
        )
      ],
    );
  }
}