formatted all files.

This commit is contained in:
Faris Armoush
2025-06-12 15:33:32 +03:00
parent 29959f567e
commit 04250ebc98
474 changed files with 5425 additions and 4338 deletions

View File

@ -1,5 +1,6 @@
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;
@ -7,14 +8,14 @@ class DialogDropdown extends StatefulWidget {
final String? selectedValue;
const DialogDropdown({
Key? key,
super.key,
required this.items,
required this.onSelected,
this.selectedValue,
}) : super(key: key);
});
@override
_DialogDropdownState createState() => _DialogDropdownState();
State<DialogDropdown> createState() => _DialogDropdownState();
}
class _DialogDropdownState extends State<DialogDropdown> {
@ -46,16 +47,14 @@ 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: [
@ -87,12 +86,9 @@ class _DialogDropdownState extends State<DialogDropdown> {
child: ListTile(
title: Text(
item,
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(
color: ColorsManager.textPrimaryColor,
),
style: context.textTheme.bodyMedium?.copyWith(
color: ColorsManager.textPrimaryColor,
),
),
onTap: () {
widget.onSelected(item);