small fixed for build to run #468

Merged
tech merged 1 commits from SEND048 into main 2026-02-11 16:22:41 +00:00
2 changed files with 0 additions and 57 deletions
Showing only changes of commit 6844d1e587 - Show all commits

View File

@@ -2,8 +2,6 @@ import 'package:flutter/material.dart';
import 'package:collection/collection.dart';
import 'package:share_plus/share_plus.dart';
import 'package:pshared/config/constants.dart';
import 'package:pshared/models/organization/organization.dart';
import 'package:pshared/provider/resource.dart';
@@ -90,55 +88,4 @@ class OrganizationsProvider extends ChangeNotifier {
// Best-effort cleanup of stored selection to avoid using stale org on next login.
await SecureStorageService.delete(Constants.currentOrgKey);
}
Future<Organization> uploadLogo(XFile logoFile) async {
if (!isOrganizationSet) {
throw StateError('Organization is not set');
}
_setResource(_resource.copyWith(isLoading: true, error: null));
try {
final updated = await OrganizationService.uploadLogoAndUpdate(current, logoFile);
final updatedList = organizations
.map((org) => org.id == updated.id ? updated : org)
.toList(growable: false);
_setResource(Resource(data: updatedList, isLoading: false));
_currentOrg = updated.id;
return updated;
} catch (e) {
_setResource(_resource.copyWith(isLoading: false, error: toException(e)));
rethrow;
}
}
Future<Organization> updateCurrent({
String? name,
String? description,
String? timeZone,
String? logoUrl,
}) async {
if (!isOrganizationSet) {
throw StateError('Organization is not set');
}
_setResource(_resource.copyWith(isLoading: true, error: null));
try {
final updated = await OrganizationService.updateSettings(
current,
name: name,
description: description,
timeZone: timeZone,
logoUrl: logoUrl,
);
final updatedList = organizations
.map((org) => org.id == updated.id ? updated : org)
.toList(growable: false);
_setResource(Resource(data: updatedList, isLoading: false));
_currentOrg = updated.id;
return updated;
} catch (e) {
_setResource(_resource.copyWith(isLoading: false, error: toException(e)));
rethrow;
}
}
}

View File

@@ -133,8 +133,4 @@ class MultiQuotationProvider extends ChangeNotifier {
notifyListeners();
}
@override
void dispose() {
super.dispose();
}
}