Skip to content

Commit

Permalink
Merge pull request #2595 from get10101/fix-welcome-screen-kbd
Browse files Browse the repository at this point in the history
fix: Stop welcome screen overflowing
  • Loading branch information
Restioson authored Jun 5, 2024
2 parents 7f594e4 + 1e94757 commit 3e685fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mobile/lib/common/scrollable_safe_area.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ import 'package:flutter/cupertino.dart';
class ScrollableSafeArea extends StatelessWidget {
const ScrollableSafeArea({
required this.child,
this.bottom = true,
Key? key,
}) : super(key: key);

final bool bottom;
final Widget child;

@override
Widget build(BuildContext context) {
return SafeArea(
bottom: bottom,
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints viewportConstraints) =>
SingleChildScrollView(
Expand Down
3 changes: 2 additions & 1 deletion mobile/lib/features/welcome/welcome_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get_10101/common/application/switch.dart';
import 'package:get_10101/common/color.dart';
import 'package:get_10101/common/scrollable_safe_area.dart';
import 'package:get_10101/features/welcome/loading_screen.dart';
import 'package:get_10101/ffi.dart';
import 'package:get_10101/logger/logger.dart';
Expand Down Expand Up @@ -34,7 +35,7 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
value: SystemUiOverlayStyle.dark,
child: Scaffold(
backgroundColor: Colors.white,
body: SafeArea(
body: ScrollableSafeArea(
bottom: false,
child: Container(
color: Colors.white,
Expand Down

0 comments on commit 3e685fb

Please sign in to comment.