message fix
This commit is contained in:
parent
d5ce47c82c
commit
dc380a9777
@ -240,10 +240,19 @@ class MessagesPageState extends State<MessagesPage>
|
|||||||
Future<void> showSendMessageSheet(BuildContext context) async {
|
Future<void> showSendMessageSheet(BuildContext context) async {
|
||||||
await messageProvider.fetchAllRecipients();
|
await messageProvider.fetchAllRecipients();
|
||||||
|
|
||||||
|
List<SendRecipient> rs = [];
|
||||||
|
|
||||||
|
List<int> add = [];
|
||||||
|
for (var r in messageProvider.recipients) {
|
||||||
|
if (!add.contains(r.id)) {
|
||||||
|
rs.add(r);
|
||||||
|
add.add(r.id ?? 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_scaffoldKey.currentState?.showBottomSheet(
|
_scaffoldKey.currentState?.showBottomSheet(
|
||||||
(context) => RoundedBottomSheet(
|
(context) =>
|
||||||
borderRadius: 14.0,
|
RoundedBottomSheet(borderRadius: 14.0, child: SendMessageSheet(rs)),
|
||||||
child: SendMessageSheet(messageProvider.recipients)),
|
|
||||||
backgroundColor: const Color(0x00000000),
|
backgroundColor: const Color(0x00000000),
|
||||||
elevation: 12.0,
|
elevation: 12.0,
|
||||||
);
|
);
|
||||||
|
@ -58,7 +58,8 @@ class SendMessageSheetState extends State<SendMessageSheet> {
|
|||||||
.map((item) => DropdownMenuItem<String>(
|
.map((item) => DropdownMenuItem<String>(
|
||||||
value: item.kretaId.toString(),
|
value: item.kretaId.toString(),
|
||||||
child: Text(
|
child: Text(
|
||||||
"${item.name ?? (item.id ?? 'Nincs név').toString()}${item.type.code != 'TANAR' ? " (${item.type.shortName})" : ''}",
|
// "${item.name ?? (item.id ?? 'Nincs név').toString()} ${item.type.code} ${item.type.code != 'TANAR' ? " (${item.type.shortName})" : ''}",
|
||||||
|
item.name ?? (item.id ?? 'Nincs név').toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user