2023-12-27 15:45:55 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2023-12-29 23:45:33 +00:00
|
|
|
import '../utils/responsive.dart';
|
|
|
|
import 'dashboard_screen.dart';
|
|
|
|
import '../components/side_menu.dart';
|
2023-12-27 15:45:55 +00:00
|
|
|
|
|
|
|
class HomeScreen extends StatelessWidget {
|
|
|
|
const HomeScreen({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
drawer: const SideMenu(),
|
|
|
|
body: SafeArea(
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
// We want this side menu only for large screen
|
|
|
|
if (Responsive.isDesktop(context))
|
|
|
|
const Expanded(
|
|
|
|
// default flex = 1
|
|
|
|
// and it takes 1/6 part of the screen
|
|
|
|
child: SideMenu(),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
// It takes 5/6 part of the screen
|
|
|
|
flex: 5,
|
|
|
|
child: DashboardScreen(),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|