forked from eatvio/eatvio_app
updated error handling, consultant rating layout and complaining logic
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import 'package:eatvio_app/core/enums/complained_content.dart';
|
||||
import 'package:eatvio_app/core/locator_service.dart';
|
||||
import 'package:eatvio_app/core/theme/custom_text_style.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:eatvio_app/core/utils/date_time_utils.dart';
|
||||
import 'package:eatvio_app/core/utils/string_extentions.dart';
|
||||
import 'package:eatvio_app/core/widgets/custom_text_form_field.dart';
|
||||
import 'package:eatvio_app/core/widgets/data_error_widget.dart';
|
||||
import 'package:eatvio_app/core/widgets/loader.dart';
|
||||
import 'package:eatvio_app/features/diets/presentation/widgets/more_options.dart';
|
||||
import 'package:eatvio_app/features/profile/models/circumference_model.dart';
|
||||
@@ -79,6 +81,8 @@ class _UserDetailsContentState extends State<UserDetailsContent> {
|
||||
visible: isMoreOptionsVisible,
|
||||
portalFollower: MoreOptions(
|
||||
path: 'profile/${widget.slug}',
|
||||
complainedContentType: ComplainedContent.profile,
|
||||
slug: widget.slug,
|
||||
),
|
||||
anchor: Aligned(
|
||||
shiftToWithinBound: AxisFlag(x: true, y: true),
|
||||
@@ -395,11 +399,20 @@ class _UserDetailsContentState extends State<UserDetailsContent> {
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
} else if (state.error != null) {
|
||||
return Scaffold(
|
||||
body: Loader(),
|
||||
appBar: AppBar(),
|
||||
body: DataErrorWidget(
|
||||
onReload: () async {
|
||||
context.read<UserDetailsCubit>().getUserDetails(widget.slug);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: Loader(),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user