#157 opt.: icloud sync

This commit is contained in:
lollipopkit
2023-09-11 22:39:44 +08:00
parent 82b0abaab3
commit 6e4aa8e56e
22 changed files with 119 additions and 41 deletions

View File

@@ -13,7 +13,7 @@ final _logger = Logger('iCloud');
class ICloud {
static const _containerId = 'iCloud.tech.lolli.serverbox';
const ICloud();
const ICloud._();
/// Upload file to iCloud
///
@@ -148,7 +148,6 @@ class ICloud {
errs.add(err);
}
}
_logger.info('Errs: $errs');
return errs.isEmpty ? null : errs;
} catch (e, s) {

View File

@@ -43,11 +43,11 @@ void showSnackBarWithAction(
));
}
void showRestartSnackbar(BuildContext context, S s) {
void showRestartSnackbar(BuildContext context, {String? btn, String? msg}) {
showSnackBarWithAction(
context,
'${s.success}\n${s.needRestart}',
s.restart,
msg ?? 'Need restart to take effect',
btn ?? 'Restart',
() => rebuildAll(context),
);
}