Vaibhav Surve 5c53a3f4be Refactor project structure and rename from 'marco' to 'on field work'
- Updated import paths across multiple files to reflect the new package name.
- Changed application name and identifiers in CMakeLists.txt, Runner.rc, and other configuration files.
- Modified web index.html and manifest.json to update the app title and name.
- Adjusted macOS and Windows project settings to align with the new application name.
- Ensured consistency in naming across all relevant files and directories.
2025-11-22 14:20:37 +05:30

116 lines
3.2 KiB
Dart

import 'package:on_field_work/helpers/theme/theme_customizer.dart';
import 'package:on_field_work/helpers/utils/mixins/ui_mixin.dart';
import 'package:on_field_work/helpers/widgets/my_spacing.dart';
import 'package:on_field_work/helpers/widgets/my_text.dart';
import 'package:on_field_work/widgets/custom_switch.dart';
import 'package:flutter/material.dart';
class RightBar extends StatefulWidget {
const RightBar({
super.key,
});
@override
_RightBarState createState() => _RightBarState();
}
class _RightBarState extends State<RightBar>
with SingleTickerProviderStateMixin, UIMixin {
ThemeCustomizer customizer = ThemeCustomizer.instance;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
customizer = ThemeCustomizer.instance;
return Container(
width: 280,
color: colorScheme.surface,
child: Column(
children: [
Container(
height: 60,
alignment: Alignment.centerLeft,
padding: MySpacing.x(24),
color: colorScheme.primaryContainer,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: MyText.labelLarge(
"Settings",
color: colorScheme.onPrimaryContainer,
),
),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Icon(
Icons.close,
size: 18,
color: colorScheme.onPrimaryContainer,
),
)
],
),
),
Expanded(
child: Container(
padding: MySpacing.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MyText.labelMedium("Color Scheme"),
Divider(),
MySpacing.height(8),
Row(
children: [
CustomSwitch.small(
value: customizer.theme == ThemeMode.light,
onChanged: (value) {
ThemeCustomizer.setTheme(ThemeMode.light);
},
),
MySpacing.width(12),
Text(
"Light",
)
],
),
MySpacing.height(8),
Row(
children: [
CustomSwitch.small(
value: customizer.theme == ThemeMode.dark,
onChanged: (value) {
ThemeCustomizer.setTheme(ThemeMode.dark);
},
),
MySpacing.width(12),
Text(
"Dark",
)
],
),
Divider(),
Text("Top Bar"),
Divider(),
],
),
))
],
),
);
}
}