SyncButton: Show a different icon on error

This commit is contained in:
Vishesh Handa
2020-10-23 15:35:46 +02:00
parent 07d0bdb7d8
commit aa805f80c5
2 changed files with 13 additions and 0 deletions

View File

@ -74,6 +74,17 @@ class _SyncButtonState extends State<SyncButton> {
);
}
if (repo.syncStatus == SyncStatus.Error) {
return GitPendingChangesBadge(
child: IconButton(
icon: const Icon(Icons.cloud_off),
onPressed: () async {
_syncRepo();
},
),
);
}
return GitPendingChangesBadge(
child: IconButton(
icon: Icon(_syncStatusIcon()),