Compare commits

..

No commits in common. "ff18f137866b8f382304bc055cc3917da42752c9" and "b2961ca7d813e23d08beed89ce94d54de214fae9" have entirely different histories.

5 changed files with 22 additions and 38 deletions

View File

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

View File

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

View File

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

View File

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

View File

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