Made content scrollable

Added SingleChildScrollView to new-room, edit-room
and the about-room tab.
NOTE: Added a padding to the new and edit room pages,
to prevent widgets from touching the screen bottom
This commit is contained in:
Jakob Meier 2023-03-24 18:21:23 +01:00
parent 09f7e4fdd1
commit ecd87cf2cd
No known key found for this signature in database
GPG key ID: 66BDC7E6A01A6152
3 changed files with 642 additions and 629 deletions

View file

@ -139,7 +139,9 @@ class _EditRoomPageState extends State<EditRoomPage> {
tooltip: "Go back",
),
),
body: Center(
body: SingleChildScrollView(child: Center(
child: Padding(
padding: const EdgeInsets.all(14),
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 400),
child: Column(
@ -239,6 +241,8 @@ class _EditRoomPageState extends State<EditRoomPage> {
],
)
)
)
)
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () async {

View file

@ -56,7 +56,10 @@ class _NewRoomPageState extends State {
tooltip: "Go back",
),
),
body: Center(
body: SingleChildScrollView(
child: Center(
child: Padding(
padding: const EdgeInsets.all(14),
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 400),
child: Column(
@ -176,6 +179,8 @@ class _NewRoomPageState extends State {
],
)
)
)
)
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () async {

View file

@ -28,7 +28,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
double height = MediaQuery.of(context).size.height;
double smallest = min(width, height);
return Center(
return SingleChildScrollView(
child:Center(
child: Column(children: [
// room meta display
...(widget.room != null)
@ -277,6 +278,9 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
))
]
: [],
]));
]
)
)
);
}
}