feat: Update asset paths for legal documents and adjust dependency injection in Privacy Security module
This commit is contained in:
@@ -48,11 +48,12 @@ class PrivacySettingsRepositoryImpl
|
||||
return _service.run<String>(
|
||||
() async {
|
||||
try {
|
||||
// Load from package asset path
|
||||
return await rootBundle.loadString(
|
||||
'packages/staff_privacy_security/assets/legal/terms_of_service.txt',
|
||||
'packages/staff_privacy_security/lib/src/assets/legal/terms_of_service.txt',
|
||||
);
|
||||
} catch (e) {
|
||||
// Fallback if asset not found
|
||||
// Final fallback if asset not found
|
||||
return 'Terms of Service - Content unavailable. Please contact support@krow.com';
|
||||
}
|
||||
},
|
||||
@@ -64,11 +65,12 @@ class PrivacySettingsRepositoryImpl
|
||||
return _service.run<String>(
|
||||
() async {
|
||||
try {
|
||||
// Load from package asset path
|
||||
return await rootBundle.loadString(
|
||||
'packages/staff_privacy_security/assets/legal/privacy_policy.txt',
|
||||
'packages/staff_privacy_security/lib/src/assets/legal/privacy_policy.txt',
|
||||
);
|
||||
} catch (e) {
|
||||
// Fallback if asset not found
|
||||
// Final fallback if asset not found
|
||||
return 'Privacy Policy - Content unavailable. Please contact privacy@krow.com';
|
||||
}
|
||||
},
|
||||
|
||||
@@ -54,7 +54,7 @@ class PrivacySecurityModule extends Module {
|
||||
);
|
||||
|
||||
// BLoC
|
||||
i.addSingleton(
|
||||
i.add(
|
||||
() => PrivacySecurityBloc(
|
||||
getPrivacySettingsUseCase: i(),
|
||||
updateLocationSharingUseCase: i(),
|
||||
@@ -64,13 +64,13 @@ class PrivacySecurityModule extends Module {
|
||||
);
|
||||
|
||||
// Legal Cubits
|
||||
i.addSingleton(
|
||||
i.add(
|
||||
() => TermsCubit(
|
||||
getTermsUseCase: i<GetTermsUseCase>(),
|
||||
),
|
||||
);
|
||||
|
||||
i.addSingleton(
|
||||
i.add(
|
||||
() => PrivacyPolicyCubit(
|
||||
getPrivacyPolicyUseCase: i<GetPrivacyPolicyUseCase>(),
|
||||
),
|
||||
|
||||
@@ -38,3 +38,5 @@ dev_dependencies:
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- lib/src/assets/legal/
|
||||
|
||||
Reference in New Issue
Block a user