mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
22 lines
481 B
Dart
22 lines
481 B
Dart
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
class ResponsiveLayout extends StatelessWidget {
|
|
final Widget desktopBody;
|
|
final Widget mobileBody;
|
|
const ResponsiveLayout({super.key,required this.desktopBody,required this.mobileBody});
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return LayoutBuilder(builder: (context, constraints) {
|
|
if(constraints.maxWidth<600){
|
|
return mobileBody;
|
|
}else{
|
|
return desktopBody;
|
|
}
|
|
},
|
|
);
|
|
}
|
|
}
|