Vaibhav Surve 7007a86ac7 Refactor button color references to use 'primary' instead of 'buttonColor' across multiple files
- Updated AttendanceButtonHelper to rename getButtonColor to getprimary.
- Changed button color references in AttendanceActionButton, ReusableListCard, UserDocumentFilterBottomSheet, and various auth screens to use contentTheme.primary.
- Adjusted color references in employee detail, expense, and directory views to align with the new primary color scheme.
- Removed unused ThemeOption class in UserProfileBar and updated color references accordingly.
- Ensured consistency in color usage for buttons and icons throughout the application.
2025-10-29 11:29:11 +05:30

116 lines
3.2 KiB
Dart

import 'package:marco/helpers/theme/theme_customizer.dart';
import 'package:marco/helpers/utils/mixins/ui_mixin.dart';
import 'package:marco/helpers/widgets/my_spacing.dart';
import 'package:marco/helpers/widgets/my_text.dart';
import 'package:marco/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(),
],
),
))
],
),
);
}
}