Revert "formatted all files."

This reverts commit 04250ebc98.
This commit is contained in:
Faris Armoush
2025-06-12 16:04:49 +03:00
parent 218f43bacb
commit c642ba2644
473 changed files with 4335 additions and 5417 deletions

View File

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';
class DialogDropdown extends StatefulWidget {
final List<String> items;
@ -8,14 +7,14 @@ class DialogDropdown extends StatefulWidget {
final String? selectedValue;
const DialogDropdown({
super.key,
Key? key,
required this.items,
required this.onSelected,
this.selectedValue,
});
}) : super(key: key);
@override
State<DialogDropdown> createState() => _DialogDropdownState();
_DialogDropdownState createState() => _DialogDropdownState();
}
class _DialogDropdownState extends State<DialogDropdown> {
@ -47,14 +46,16 @@ class _DialogDropdownState extends State<DialogDropdown> {
}
OverlayEntry _createOverlayEntry() {
final renderBox = context.findRenderObject()! as RenderBox;
final renderBox = context.findRenderObject() as RenderBox;
final size = renderBox.size;
final offset = renderBox.localToGlobal(Offset.zero);
return OverlayEntry(
builder: (context) {
return GestureDetector(
onTap: _closeDropdown,
onTap: () {
_closeDropdown();
},
behavior: HitTestBehavior.translucent,
child: Stack(
children: [
@ -86,9 +87,12 @@ class _DialogDropdownState extends State<DialogDropdown> {
child: ListTile(
title: Text(
item,
style: context.textTheme.bodyMedium?.copyWith(
color: ColorsManager.textPrimaryColor,
),
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(
color: ColorsManager.textPrimaryColor,
),
),
onTap: () {
widget.onSelected(item);

View File

@ -10,25 +10,24 @@ class EditChip extends StatelessWidget {
final double borderRadius;
const EditChip({
super.key,
Key? key,
this.label = 'Edit',
required this.onTap,
this.labelColor = ColorsManager.spaceColor,
this.backgroundColor = ColorsManager.whiteColors,
this.borderColor = ColorsManager.spaceColor,
this.borderRadius = 16.0,
});
}) : super(key: key);
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Chip(
label: Text(label,
style: Theme.of(context)
.textTheme
.bodySmall!
.copyWith(color: labelColor)),
label: Text(
label,
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: labelColor)
),
backgroundColor: backgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(borderRadius),

View File

@ -9,12 +9,12 @@ class TagDialogTextfieldDropdown extends StatefulWidget {
final String product;
const TagDialogTextfieldDropdown({
super.key,
Key? key,
required this.items,
required this.onSelected,
this.initialValue,
required this.product,
});
}) : super(key: key);
@override
_DialogTextfieldDropdownState createState() =>
@ -79,7 +79,7 @@ class _DialogTextfieldDropdownState extends State<TagDialogTextfieldDropdown> {
}
OverlayEntry _createOverlayEntry() {
final renderBox = context.findRenderObject()! as RenderBox;
final renderBox = context.findRenderObject() as RenderBox;
final size = renderBox.size;
final offset = renderBox.localToGlobal(Offset.zero);

View File

@ -10,8 +10,7 @@ class CustomExpansionTile extends StatefulWidget {
final ValueChanged<bool>? onExpansionChanged; // Notify when expansion changes
final VoidCallback? onItemSelected; // Callback for selecting the item
const CustomExpansionTile({
super.key,
CustomExpansionTile({
required this.title,
this.children,
this.initiallyExpanded = false,

View File

@ -7,7 +7,7 @@ class CustomSearchBar extends StatefulWidget {
final TextEditingController? controller;
final String hintText;
final String? searchQuery;
final void Function(String)? onSearchChanged;
final Function(String)? onSearchChanged; // Callback for search input changes
const CustomSearchBar({
super.key,
@ -37,7 +37,7 @@ class _CustomSearchBarState extends State<CustomSearchBar> {
color: ColorsManager.whiteColors,
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.2),
color: Colors.black.withOpacity(0.2),
spreadRadius: 0,
blurRadius: 8,
offset: const Offset(0, 4),
@ -57,7 +57,7 @@ class _CustomSearchBarState extends State<CustomSearchBar> {
style: const TextStyle(
color: Colors.black,
),
onChanged: widget.onSearchChanged,
onChanged: widget.onSearchChanged, // Call the callback on text change
decoration: InputDecoration(
filled: true,
fillColor: ColorsManager.textFieldGreyColor,