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