void displayCfgUploadErrorMsg()

in frontend/frontend-flutter/lib/screens/settings.dart [387:435]


  void displayCfgUploadErrorMsg() {
    showDialog(
      context: context,
      barrierDismissible: true,
      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: "Please check you have uploaded a config_frontend.json\n" +
                    "file similar as the one below:\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:'}', style: TextStyle(color: Colors.black),),
              ],
            ),
          ),
          actions: [
            TextButton(
              onPressed: () {
                Navigator.of(context).pop(); // Close the dialog
              },
              child: Text('OK'),
            ),
          ],
        );
      },
    );
  }