added legal state bar content

This commit is contained in:
2024-03-26 20:50:57 +01:00
parent a718e02827
commit 10b0c59c3f
7 changed files with 155 additions and 34 deletions

View File

@ -1,11 +1,54 @@
import 'package:app/model/legelState.dart';
import 'package:flutter/cupertino.dart';
import 'package:app/model/stateInfo.dart';
import 'package:flutter/material.dart';
class LegalStatusState extends ChangeNotifier {
LegalState _legalState = LegalState.unknown;
LegalState get getLegalState => _legalState;
StateInfo get info {
switch(_legalState) {
case LegalState.allowed:
return StateInfo(
icon: Icons.check,
color: Colors.lightGreen,
title: "Passt",
subtitle: "Alle kriterien erfüllt",
description: "asd"
);
case LegalState.disallowedTime:
return StateInfo(
icon: Icons.timer_outlined,
color: Colors.amber,
title: "Zu früh",
subtitle: "Bubazen ist nur zwischn 20 und 6 uhr Abends/ Nachts erlaubt!",
description: "asd"
);
case LegalState.disallowedRegion:
return StateInfo(
icon: Icons.location_off_outlined,
color: Colors.red,
title: "Zu nah an einem geschützen Gebäude",
subtitle: "asd",
description: "asd"
);
case LegalState.unknown:
default:
return StateInfo(
icon: Icons.question_mark_outlined,
color: Colors.grey,
title: "Status nicht bekannt",
subtitle: "asd",
description: "asd"
);
}
}
set setInSightOfDisallowedAreas(bool isInSight) {
_legalState = LegalState.disallowedRegion;
notifyListeners();