in frontend/frontend-flutter/lib/main.dart [2466:2573]
void noCfgStoredinFirestore() {
showDialog(
context: context, //navigatorKey.currentContext!,
builder: (BuildContext context) {
return AlertDialog(
title: Row(
// Use a Row to align the icon and title
children: [
Icon(Icons.warning, color: Colors.red),
SizedBox(width: 8), // Add some spacing
Text('Alert'),
],
),
content: SelectableText.rich(
TextSpan(
children: [
TextSpan(
text: "You must first create and load a configuration file\n" +
"using the Settings -> Upload frontend config file option.\n" +
'For that, copy and paste the content below in a file\n' +
"that you'll name config_frontend.json:\n\n"),
TextSpan(
text: "{\n",
style: TextStyle(color: Colors.black),
),
TextSpan(
text: '"endpoint_opendataqnq": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '"<URI of the backend endpoint>",\n',
style: TextStyle(color: Colors.green),
),
TextSpan(
text: '"firestore_database_id": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '"opendataqna-session-logs",\n',
style: TextStyle(color: Colors.green),
),
TextSpan(
text: '"firestore_history_collection": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '"session_logs",\n',
style: TextStyle(color: Colors.green),
),
TextSpan(
text: '"firestore_cfg_collection": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '"front_end_flutter_cfg",\n',
style: TextStyle(color: Colors.green),
),
TextSpan(
text: '"expert_mode": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '<true|false>,\n',
style: TextStyle(color: Colors.red),
),
TextSpan(
text: '"anonymized_data": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '<true|false>,\n',
style: TextStyle(color: Colors.red),
),
TextSpan(
text: '"firebase_app_name": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '"opendataqna"\n',
style: TextStyle(color: Colors.green),
),
TextSpan(
text: '"imported_questions": ',
style: TextStyle(color: Colors.blueAccent),
),
TextSpan(
text: '"imported_questions"\n',
style: TextStyle(color: Colors.green),
),
TextSpan(
text: '}',
style: TextStyle(color: Colors.black),
),
],
),
),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop(); // Close the dialog
},
child: Text('OK'),
),
],
);
},
);
}