handle null error in profile

This commit is contained in:
amirrezaghabeli
2025-08-27 13:33:47 +03:30
parent 0b2825f836
commit c401c6c8d9
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -1,5 +1,8 @@
class AppStrings { class AppStrings {
AppStrings._(); AppStrings._();
static const String noData = 'No data';
// App Titles // App Titles
static const String appName = 'My Awesome App'; static const String appName = 'My Awesome App';
static const String loginTitle = 'Welcome Back'; static const String loginTitle = 'Welcome Back';
@@ -65,6 +65,10 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
return Center(child: Text(viewModel.errorMessage!)); return Center(child: Text(viewModel.errorMessage!));
} }
if (viewModel.companyProfileData == null) {
return Center(child: Text(AppStrings.noData));
}
return Padding( return Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 24.0.w(), horizontal: 24.0.w(),