Compare commits

...

3 Commits

Author SHA1 Message Date
mohamadmahdi jebeli ff18f13786 fixed text field size 2025-07-16 13:40:18 +03:30
mohamadmahdi jebeli 9902666c0c update category 2025-07-16 13:39:31 +03:30
mohamadmahdi jebeli a9a8949cd0 fixed otp space 2025-07-16 13:38:01 +03:30
5 changed files with 38 additions and 22 deletions

View File

@ -42,7 +42,6 @@ class _AuthenticationState extends State<Authentication> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false,
body: Consumer<AuthenticationState>( body: Consumer<AuthenticationState>(
builder: (context, state, child) => WillPopScope( builder: (context, state, child) => WillPopScope(
onWillPop: () async { onWillPop: () async {

View File

@ -49,7 +49,8 @@ class AuthenticationLayout extends StatelessWidget {
SliverPadding( SliverPadding(
padding: const EdgeInsets.symmetric(horizontal: 20), padding: const EdgeInsets.symmetric(horizontal: 20),
sliver: SliverFillRemaining( sliver: SliverFillRemaining(
hasScrollBody: false, hasScrollBody: true,
fillOverscroll: true,
child: Column( child: Column(
children: [ children: [
for (var i = 0; i < children.length; i++) children[i], for (var i = 0; i < children.length; i++) children[i],

View File

@ -24,6 +24,7 @@ class CustomizeCategoryState extends CoreProvier {
Future<void> getFavourites() async { Future<void> getFavourites() async {
appState = AppState.busy; appState = AppState.busy;
update();
final service = RequestService( final service = RequestService(
RequestHelper.favourites(), RequestHelper.favourites(),
@ -31,13 +32,19 @@ class CustomizeCategoryState extends CoreProvier {
await service.httpGet(); await service.httpGet();
if (service.isSuccess) { if (service.isSuccess) {
faves.clear(); faves.clear();
final favourites = service.data('types'); final favouritesData = service.data('types');
for (var i = 0; i < favourites.length; i++) { if (favouritesData is List) {
faves.add(FavoritesResponse.fromJson(favourites[i])); for (var i = 0; i < favouritesData.length; i++) {
faves.add(FavoritesResponse.fromJson(favouritesData[i]));
} }
}
// اضافه کردن مستقیم بخش فرصت و تهدید
faves.add(FavoritesResponse(id: 999, name: 'فرصت و تهدید', selected: false));
selectedFavIds.clear(); selectedFavIds.clear();
for (var element in faves) { for (var element in faves) {
if (element.selected!) { if (element.selected == true) {
selectedFavIds.add(element.id!); selectedFavIds.add(element.id!);
} }
} }

View File

@ -78,7 +78,9 @@ class _FavoritesStepState extends State<FavoritesStep> {
asset: Assets.emptyChat, asset: Assets.emptyChat,
title: 'اولین نظر را بنویسید...', title: 'اولین نظر را بنویسید...',
), ),
builder: (context, state, index) => Center( builder: (context, state, index) => Column(
children: [
Center(
child: Container( child: Container(
height: 48, height: 48,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -86,13 +88,13 @@ class _FavoritesStepState extends State<FavoritesStep> {
border: Border.all( border: Border.all(
width: 1, width: 1,
color: state.faves[index].selected! color: state.faves[index].selected!
? Theme.of(context) ? Theme.of(context).colorScheme.focusedBorder
.colorScheme : Theme.of(context).colorScheme.cardBorder
.focusedBorder ),
: Theme.of(context).colorScheme.cardBorder),
color: state.faves[index].selected! color: state.faves[index].selected!
? Theme.of(context).colorScheme.focused ? Theme.of(context).colorScheme.focused
: Theme.of(context).colorScheme.cardBorder), : Theme.of(context).colorScheme.cardBorder
),
child: CustomizeCategoryCheckbox( child: CustomizeCategoryCheckbox(
title: state.faves[index].name!, title: state.faves[index].name!,
value: state.faves[index].selected, value: state.faves[index].selected,
@ -100,7 +102,14 @@ class _FavoritesStepState extends State<FavoritesStep> {
onChanged: (val) { onChanged: (val) {
state.changeSelected( state.changeSelected(
index, state.faves, state.selectedFavIds); index, state.faves, state.selectedFavIds);
})), }
)
),
),
// Add extra bottom padding for the last item
if (index == state.faves.length - 1)
const SizedBox(height: 80),
],
), ),
), ),
), ),

View File

@ -109,7 +109,7 @@ class _DidvanTextFieldState extends State<DidvanTextField> {
? TextDirection.ltr ? TextDirection.ltr
: TextDirection.rtl, : TextDirection.rtl,
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB(kIsWeb?8:8,kIsWeb?4:8,kIsWeb?8:0,kIsWeb?0:8), padding: const EdgeInsets.fromLTRB(kIsWeb?8:4,kIsWeb?4:4,kIsWeb?8:0,kIsWeb?0:8),
child: Center( child: Center(
child: TextFormField( child: TextFormField(
inputFormatters: <TextInputFormatter>[ inputFormatters: <TextInputFormatter>[