自适应布局的奥秘

参考阅读:

https://medium.com/flutter-community/developing-for-multiple-screen-sizes-and-orientations-in-flutter-fragments-in-flutter-a4c51b849434

https://flutter.cn/docs/development/ui/layout/adaptive-responsive

还有种方式:

import 'dart:io';
import 'package:flutter/foundation.dart';

@override
Widget build(BuildContext context) {
    if(kIsWeb || Platform.isMacOS || Platform.isLinux || Platform.isWindows) {
        return DesktopLayout();
    }
    
    return MobileLayout();
}

https://aloisdeniel.com/#/posts/adaptative-ui

 

分类: 默认 标签: 发布于: 2021-12-16 16:52:16, 更新于: 2021-12-16 16:59:57