Compare commits
3 Commits
b2961ca7d8
...
ff18f13786
| Author | SHA1 | Date |
|---|---|---|
|
|
ff18f13786 | |
|
|
9902666c0c | |
|
|
a9a8949cd0 |
|
|
@ -42,7 +42,6 @@ class _AuthenticationState extends State<Authentication> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: Consumer<AuthenticationState>(
|
||||
builder: (context, state, child) => WillPopScope(
|
||||
onWillPop: () async {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ class AuthenticationLayout extends StatelessWidget {
|
|||
SliverPadding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
sliver: SliverFillRemaining(
|
||||
hasScrollBody: false,
|
||||
hasScrollBody: true,
|
||||
fillOverscroll: true,
|
||||
child: Column(
|
||||
children: [
|
||||
for (var i = 0; i < children.length; i++) children[i],
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class CustomizeCategoryState extends CoreProvier {
|
|||
|
||||
Future<void> getFavourites() async {
|
||||
appState = AppState.busy;
|
||||
update();
|
||||
|
||||
final service = RequestService(
|
||||
RequestHelper.favourites(),
|
||||
|
|
@ -31,13 +32,19 @@ class CustomizeCategoryState extends CoreProvier {
|
|||
await service.httpGet();
|
||||
if (service.isSuccess) {
|
||||
faves.clear();
|
||||
final favourites = service.data('types');
|
||||
for (var i = 0; i < favourites.length; i++) {
|
||||
faves.add(FavoritesResponse.fromJson(favourites[i]));
|
||||
final favouritesData = service.data('types');
|
||||
if (favouritesData is List) {
|
||||
for (var i = 0; i < favouritesData.length; i++) {
|
||||
faves.add(FavoritesResponse.fromJson(favouritesData[i]));
|
||||
}
|
||||
}
|
||||
|
||||
// اضافه کردن مستقیم بخش فرصت و تهدید
|
||||
faves.add(FavoritesResponse(id: 999, name: 'فرصت و تهدید', selected: false));
|
||||
|
||||
selectedFavIds.clear();
|
||||
for (var element in faves) {
|
||||
if (element.selected!) {
|
||||
if (element.selected == true) {
|
||||
selectedFavIds.add(element.id!);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,9 @@ class _FavoritesStepState extends State<FavoritesStep> {
|
|||
asset: Assets.emptyChat,
|
||||
title: 'اولین نظر را بنویسید...',
|
||||
),
|
||||
builder: (context, state, index) => Center(
|
||||
builder: (context, state, index) => Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
height: 48,
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -86,13 +88,13 @@ class _FavoritesStepState extends State<FavoritesStep> {
|
|||
border: Border.all(
|
||||
width: 1,
|
||||
color: state.faves[index].selected!
|
||||
? Theme.of(context)
|
||||
.colorScheme
|
||||
.focusedBorder
|
||||
: Theme.of(context).colorScheme.cardBorder),
|
||||
? 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),
|
||||
: Theme.of(context).colorScheme.cardBorder
|
||||
),
|
||||
child: CustomizeCategoryCheckbox(
|
||||
title: state.faves[index].name!,
|
||||
value: state.faves[index].selected,
|
||||
|
|
@ -100,7 +102,14 @@ class _FavoritesStepState extends State<FavoritesStep> {
|
|||
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),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class _DidvanTextFieldState extends State<DidvanTextField> {
|
|||
? TextDirection.ltr
|
||||
: TextDirection.rtl,
|
||||
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: TextFormField(
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
|
|
|
|||
Loading…
Reference in New Issue