Added missing routes

and added a padding around the visibility selector
This commit is contained in:
Jakob Meier 2023-03-23 11:05:18 +01:00
parent db5e950a93
commit 8e02de97c1
No known key found for this signature in database
GPG key ID: 66BDC7E6A01A6152

View file

@ -59,7 +59,9 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
),
Text(widget.room?.description ?? '',
style: textTheme.bodyMedium),
SegmentedButton<int>(
Padding(
padding: const EdgeInsets.all(8),
child: SegmentedButton<int>(
showSelectedIcon: true,
multiSelectionEnabled: false,
emptySelectionAllowed: false,
@ -89,7 +91,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
showDialog(
context: context,
builder: (ctx) => AlertDialog(
title: const Text('Change room visibility'),
title:
const Text('Change room visibility'),
content: Text(
'Do you really want to change the room visibility to: ${vis.text}'),
actions: [
@ -152,13 +155,15 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
} catch (_) {
// network error
final snackBar = SnackBar(
behavior: SnackBarBehavior.floating,
behavior:
SnackBarBehavior.floating,
content:
const Text('Network error'),
action: SnackBarAction(
label: 'Dismiss',
onPressed: () {
scaffMgr.hideCurrentSnackBar();
scaffMgr
.hideCurrentSnackBar();
},
),
);
@ -176,7 +181,7 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
}),
selected: {(widget.room?.visibility?.type)!},
selectedIcon: Icon((widget.room?.visibility?.icon)!),
),
)),
],
),
)
@ -201,7 +206,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
subtitle: const Text(
'Change the rooms name, description and icon'),
onTap: () {
// TODO: show edit room screen
// show edit room screen
Routemaster.of(context).push('/r/${widget.room?.serverTag}/${widget.room?.id}/edit');
},
),
]
@ -212,7 +218,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
title: const Text('Members'),
subtitle: const Text('Show Member list'),
onTap: () {
// TODO: open member view screen
// open member view screen
Routemaster.of(context).push('/r/${widget.room?.serverTag}/${widget.room?.id}/members');
},
),
...(widget.info != null &&
@ -226,7 +233,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
title: const Text('OTA'),
subtitle: const Text('Manage and delete OTAs'),
onTap: () {
// TODO: show manage ota screen
// show manage ota screen
Routemaster.of(context).push('/r/${widget.room?.serverTag}/${widget.room?.id}/ota');
},
),
]