Compare commits
6 Commits
9d0cf8e313
...
develop
Author | SHA1 | Date | |
---|---|---|---|
0a66858d93 | |||
49428680de | |||
0c676dc3d6 | |||
c702b610c5 | |||
5938c6b3c3 | |||
c44b0464a4 |
@ -18,7 +18,7 @@ class AutocompleteResponseObject {
|
|||||||
String label;
|
String label;
|
||||||
String? icon;
|
String? icon;
|
||||||
String? source;
|
String? source;
|
||||||
List<String>? status;
|
String? status;
|
||||||
String? subline;
|
String? subline;
|
||||||
String? shareWithDisplayNameUniqe;
|
String? shareWithDisplayNameUniqe;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ AutocompleteResponseObject _$AutocompleteResponseObjectFromJson(
|
|||||||
json['label'] as String,
|
json['label'] as String,
|
||||||
json['icon'] as String?,
|
json['icon'] as String?,
|
||||||
json['source'] as String?,
|
json['source'] as String?,
|
||||||
(json['status'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
json['status'] as String?,
|
||||||
json['subline'] as String?,
|
json['subline'] as String?,
|
||||||
json['shareWithDisplayNameUniqe'] as String?,
|
json['shareWithDisplayNameUniqe'] as String?,
|
||||||
);
|
);
|
||||||
|
@ -3,26 +3,28 @@ import 'package:flutter/material.dart';
|
|||||||
import '../../../../../api/marianumcloud/talk/getParticipants/getParticipantsResponse.dart';
|
import '../../../../../api/marianumcloud/talk/getParticipants/getParticipantsResponse.dart';
|
||||||
import '../../../../../widget/userAvatar.dart';
|
import '../../../../../widget/userAvatar.dart';
|
||||||
|
|
||||||
class ParticipantsListView extends StatefulWidget {
|
class ParticipantsListView extends StatelessWidget {
|
||||||
final GetParticipantsResponse participantsResponse;
|
final GetParticipantsResponse participantsResponse;
|
||||||
const ParticipantsListView(this.participantsResponse, {super.key});
|
const ParticipantsListView(this.participantsResponse, {super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ParticipantsListView> createState() => _ParticipantsListViewState();
|
Widget build(BuildContext context) {
|
||||||
}
|
final participants = participantsResponse.data.map((participant) => ListTile(
|
||||||
|
leading: UserAvatar(id: participant.actorId),
|
||||||
|
title: Text(participant.displayName),
|
||||||
|
subtitle: participant.statusMessage != null ? Text(participant.statusMessage!) : null,
|
||||||
|
)).toList();
|
||||||
|
|
||||||
class _ParticipantsListViewState extends State<ParticipantsListView> {
|
lastname(participant) => participant.title.toString().split(' ').last;
|
||||||
@override
|
participants.sort((a, b) => lastname(a).compareTo(lastname(b)));
|
||||||
Widget build(BuildContext context) => Scaffold(
|
|
||||||
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Teilnehmende'),
|
title: const Text('Teilnehmende'),
|
||||||
),
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: widget.participantsResponse.data.map((participant) => ListTile(
|
children: participants,
|
||||||
leading: UserAvatar(id: participant.actorId),
|
|
||||||
title: Text(participant.displayName),
|
|
||||||
subtitle: participant.statusMessage != null ? Text(participant.statusMessage!) : null,
|
|
||||||
)).toList(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user