refactor codes

This commit is contained in:
amirrezaghabeli
2025-08-12 12:16:33 +03:30
parent 68ba19d210
commit 36c3faa747
17 changed files with 619 additions and 671 deletions
+1 -29
View File
@@ -28,35 +28,7 @@ class MobileHomePage extends StatelessWidget {
}
if (homeViewModel.errorMessage != null) {
return Center(
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(
Icons.error_outline,
size: 64,
color: Colors.red,
),
const SizedBox(height: 16),
Text(
homeViewModel.errorMessage!,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
color: Colors.grey.shade700,
),
),
const SizedBox(height: 24),
ElevatedButton(
onPressed: () => homeViewModel.getHome(),
child: const Text('Try Again'),
),
],
),
),
);
return Center(child: Text(homeViewModel.errorMessage!));
}
return SingleChildScrollView(