Added missing routes
and added a padding around the visibility selector
This commit is contained in:
parent
db5e950a93
commit
8e02de97c1
1 changed files with 288 additions and 280 deletions
|
@ -59,7 +59,9 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
||||||
),
|
),
|
||||||
Text(widget.room?.description ?? '',
|
Text(widget.room?.description ?? '',
|
||||||
style: textTheme.bodyMedium),
|
style: textTheme.bodyMedium),
|
||||||
SegmentedButton<int>(
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
child: SegmentedButton<int>(
|
||||||
showSelectedIcon: true,
|
showSelectedIcon: true,
|
||||||
multiSelectionEnabled: false,
|
multiSelectionEnabled: false,
|
||||||
emptySelectionAllowed: false,
|
emptySelectionAllowed: false,
|
||||||
|
@ -89,7 +91,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (ctx) => AlertDialog(
|
builder: (ctx) => AlertDialog(
|
||||||
title: const Text('Change room visibility'),
|
title:
|
||||||
|
const Text('Change room visibility'),
|
||||||
content: Text(
|
content: Text(
|
||||||
'Do you really want to change the room visibility to: ${vis.text}'),
|
'Do you really want to change the room visibility to: ${vis.text}'),
|
||||||
actions: [
|
actions: [
|
||||||
|
@ -152,13 +155,15 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
// network error
|
// network error
|
||||||
final snackBar = SnackBar(
|
final snackBar = SnackBar(
|
||||||
behavior: SnackBarBehavior.floating,
|
behavior:
|
||||||
|
SnackBarBehavior.floating,
|
||||||
content:
|
content:
|
||||||
const Text('Network error'),
|
const Text('Network error'),
|
||||||
action: SnackBarAction(
|
action: SnackBarAction(
|
||||||
label: 'Dismiss',
|
label: 'Dismiss',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
scaffMgr.hideCurrentSnackBar();
|
scaffMgr
|
||||||
|
.hideCurrentSnackBar();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -176,7 +181,7 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
||||||
}),
|
}),
|
||||||
selected: {(widget.room?.visibility?.type)!},
|
selected: {(widget.room?.visibility?.type)!},
|
||||||
selectedIcon: Icon((widget.room?.visibility?.icon)!),
|
selectedIcon: Icon((widget.room?.visibility?.icon)!),
|
||||||
),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -201,7 +206,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
||||||
subtitle: const Text(
|
subtitle: const Text(
|
||||||
'Change the rooms name, description and icon'),
|
'Change the rooms name, description and icon'),
|
||||||
onTap: () {
|
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'),
|
title: const Text('Members'),
|
||||||
subtitle: const Text('Show Member list'),
|
subtitle: const Text('Show Member list'),
|
||||||
onTap: () {
|
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 &&
|
...(widget.info != null &&
|
||||||
|
@ -226,7 +233,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
||||||
title: const Text('OTA'),
|
title: const Text('OTA'),
|
||||||
subtitle: const Text('Manage and delete OTAs'),
|
subtitle: const Text('Manage and delete OTAs'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// TODO: show manage ota screen
|
// show manage ota screen
|
||||||
|
Routemaster.of(context).push('/r/${widget.room?.serverTag}/${widget.room?.id}/ota');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue