layout web

This commit is contained in:
mohammad
2024-07-18 15:12:06 +03:00
parent 71bba79887
commit 68fe7d9634
23 changed files with 1242 additions and 226 deletions

View File

@ -0,0 +1,21 @@
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;
}
},
);
}
}