NEW: Privacy Policy and TOS Popup
This commit is contained in:
29
Frontend/lib/mih_components/mih_objects/user_consent.dart
Normal file
29
Frontend/lib/mih_components/mih_objects/user_consent.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
class UserConsent {
|
||||
String app_id;
|
||||
DateTime privacy_policy_accepted;
|
||||
DateTime terms_of_services_accepted;
|
||||
|
||||
UserConsent({
|
||||
required this.app_id,
|
||||
required this.privacy_policy_accepted,
|
||||
required this.terms_of_services_accepted,
|
||||
});
|
||||
|
||||
factory UserConsent.fromJson(Map<String, dynamic> json) {
|
||||
return UserConsent(
|
||||
app_id: json['app_id'],
|
||||
privacy_policy_accepted: DateTime.parse(json['privacy_policy_accepted']),
|
||||
terms_of_services_accepted:
|
||||
DateTime.parse(json['terms_of_services_accepted']),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'app_id': app_id,
|
||||
'privacy_policy_accepted': privacy_policy_accepted.toIso8601String(),
|
||||
'terms_of_services_accepted':
|
||||
terms_of_services_accepted.toIso8601String(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||
@@ -99,7 +100,7 @@ class _MihPackageAlertState extends State<MihPackageAlert> {
|
||||
height: 50,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
|
||||
Reference in New Issue
Block a user