togglerIntegrityCheck method

Widget togglerIntegrityCheck(
  1. BuildContext context,
  2. QuizEngineState state
)

Implementation

Widget togglerIntegrityCheck(
  BuildContext context,
  QuizEngineState state,
) {
  return IconButton(
    onPressed: () {
      // ignore: invalid_use_of_protected_member
      state.setState(() {
        state.showIntegrityCheckPanel = !state.showIntegrityCheckPanel;
      });
    },
    icon: Row(
      spacing: gap,
      children: [
        const Icon(Icons.security),
        Text(!state.showIntegrityCheckPanel ? 'Debug infos' : 'fermer debug'),
      ],
    ),
  );
}