manager-app/lib/Components/fetch_section_icon.dart
Thomas Fransolet e644cd487f misc !
2025-05-14 17:13:13 +02:00

30 lines
881 B
Dart

import 'package:flutter/material.dart';
import 'package:manager_api_new/api.dart';
IconData getSectionIcon(elementType) {
switch(elementType) {
case SectionType.Map:
return Icons.location_on;
case SectionType.Slider:
return Icons.collections; // art_track
case SectionType.Video:
return Icons.ondemand_video_rounded;
case SectionType.Web:
return Icons.web;
case SectionType.Menu:
return Icons.apps_sharp;
case SectionType.Quiz:
return Icons.question_answer;
case SectionType.Article:
return Icons.article_outlined;
case SectionType.Pdf:
return Icons.picture_as_pdf_outlined;
case SectionType.Puzzle:
return Icons.extension;
case SectionType.Agenda:
return Icons.calendar_month_outlined;
case SectionType.Weather:
return Icons.sunny;
}
return Icons.question_mark;
}