mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
added fonts, fixed alignment, and responsivness for the web
This commit is contained in:
@ -1,59 +1,75 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
import 'package:syncrow_web/pages/common/text_field/custom_web_textfield.dart';
|
||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||
|
||||
class MenuSidebar extends StatelessWidget {
|
||||
class MenuSidebar extends StatelessWidget with HelperResponsiveLayout {
|
||||
const MenuSidebar({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black26,
|
||||
offset: Offset(4, 0),
|
||||
blurRadius: 10,
|
||||
)
|
||||
],
|
||||
color: ColorsManager.whiteColors,
|
||||
),
|
||||
width: 200,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'Community',
|
||||
style: TextStyle(fontSize: 20),
|
||||
),
|
||||
CircleAvatar(
|
||||
backgroundColor: Colors.grey.shade200,
|
||||
child: IconButton(
|
||||
color: ColorsManager.onSecondaryColor,
|
||||
onPressed: () {},
|
||||
icon: const Icon(Icons.add)),
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
TextFormField(
|
||||
controller: TextEditingController(),
|
||||
decoration: textBoxDecoration(suffixIcon: true)),
|
||||
Container(
|
||||
height: 100,
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
double sidebarWidth;
|
||||
|
||||
if (isLargeScreenSize(context)) {
|
||||
sidebarWidth = 250;
|
||||
} else if (isMediumScreenSize(context)) {
|
||||
sidebarWidth = 230;
|
||||
} else {
|
||||
sidebarWidth = 200;
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: sidebarWidth,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black26,
|
||||
offset: Offset(4, 0),
|
||||
blurRadius: 10,
|
||||
)
|
||||
],
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'Community',
|
||||
style: TextStyle(fontSize: 20),
|
||||
),
|
||||
CircleAvatar(
|
||||
backgroundColor: Colors.grey.shade200,
|
||||
child: IconButton(
|
||||
color: Colors.grey,
|
||||
onPressed: () {},
|
||||
icon: const Icon(Icons.add),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
SizedBox(
|
||||
height: 100,
|
||||
child: CustomWebTextField(
|
||||
isRequired: false,
|
||||
textFieldName: '',
|
||||
controller: TextEditingController(),
|
||||
hintText: 'Search...',
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user