Anscheinend sind die Buttons auf sehr kleinen Bildschirmen nicht mehr zu sehen bzw. abgeschnitten. Woran kann es liegen und wie optimiert man das?

import 'package:flutter/material.dart';
import 'package:patient_app/models/appointment.dart';
import 'package:patient_app/models/hospital_account.dart';
import 'package:patient_app/models/managed_patient.dart';
import 'package:patient_app/models/patient_pass.dart';
import 'package:patient_app/models/scan_result.dart';
import 'package:patient_app/modules/account_linking/account_linking_state_manager.dart';
import 'package:patient_app/modules/account_linking/service/account_linking_service.dart';
import 'package:patient_app/modules/account_linking/widgets/account_linking_decryption_section.dart';
import 'package:patient_app/provider/managed_patient_provider.dart';
import 'package:patient_app/repositories/appointment_repository.dart';
import 'package:patient_app/repositories/managed_patient_repository.dart';
import 'package:patient_app/router/state_managers/hospital_account_state_manager.dart';
import 'package:patient_app/tools/qr_code_content_expert.dart';
import 'package:patient_app/widgets/patient_app_header.dart';
import 'package:provider/provider.dart';

class AccountLinkingSetupScreen extends StatelessWidget {
  static MaterialPage page(ScanResult scanResult) {
    return MaterialPage(
      name: "AccountLinkingSetup",
      key: const ValueKey("AccountLinkingSetup"),
      child: AccountLinkingSetupScreen(scanResult: scanResult),
    );
  }

  const AccountLinkingSetupScreen({Key? key, required this.scanResult})
      : super(key: key);

  final ScanResult scanResult;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: PatientAppHeader.buildAppBar(context),
      body: ListView(
        children: [
          AccountLinkingDecryptionSection(
            encryptedQrCode: scanResult.qrCodeAsString,
            handleDecryptedQrCodeCallback: _decryptAndSetup,
          ),
        ],
      ),
    );
  }

  Future<void> _decryptAndSetup(
      BuildContext context, String qrCodeString, String encryptedQrCode) async {
    var qrCodeParts = QrCodeContentExpert.getQRCodeParts(qrCodeString);

    List<Appointment> appointmentsFromQrCode =
        QrCodeContentExpert.extractAppointments(qrCodeParts[0]);
    AppointmentRepository().storeAppointments(appointmentsFromQrCode);

    PatientPass? patientPass;
    if (QrCodeContentExpert.isNotExpired(qrCodeParts[2], DateTime.now())) {
      patientPass = QrCodeContentExpert.extractPatientPass(qrCodeParts[2]);
    }

    ManagedPatient managedPatient =
        await ManagedPatientProvider().getOrCreateManagedPatient();
    managedPatient.hospitalAccount = HospitalAccount(patientPass: patientPass);
    ManagedPatientRepository().store(managedPatient);
    context
        .read<ManagedPatientStateManager>()
        .createState(managedPatient: managedPatient, notify: false);

    context.read<AccountLinkingStateManager>().updateLinkingFuture(
        AccountLinkingService()
            .createHospitalAccount(context, qrCodeParts, encryptedQrCode));
  }
}
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/patient_app_localizations.dart';
import 'package:patient_app/modules/account_linking/account_linking_state_manager.dart';
import 'package:patient_app/theme/patient_app_theme.dart' as theme;
import 'package:patient_app/tools/page_size_expert.dart';
import 'package:patient_app/tools/qr_code_decrypter.dart';
import 'package:patient_app/widgets/date_of_birth_input.dart';
import 'package:patient_app/widgets/error_display.dart';
import 'package:provider/provider.dart';

typedef HandleDecryptedQrCodeCallback = Future<void> Function(
    BuildContext context, String qrCodeString, String encryptedQrCode);

class AccountLinkingDecryptionSection extends StatefulWidget {
  const AccountLinkingDecryptionSection({
    Key? key,
    required this.encryptedQrCode,
    required this.handleDecryptedQrCodeCallback,
  }) : super(key: key);

  final String encryptedQrCode;
  final HandleDecryptedQrCodeCallback handleDecryptedQrCodeCallback;

  @override
  AccountLinkingDecryptionSectionState createState() =>
      AccountLinkingDecryptionSectionState();
}

class AccountLinkingDecryptionSectionState
    extends State<AccountLinkingDecryptionSection> {
  late AppLocalizations _l10n;
  bool hasError = false;
  final int maxFailedAttempts = 2;
  int failedAttempts = 0;
  bool _encryptionInProgress = false;

  @override
  void didChangeDependencies() {
    _l10n = AppLocalizations.of(context)!;
    super.didChangeDependencies();
  }

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider<DateOfBirthInputModel>(
        create: (_) => DateOfBirthInputModel(null),
        builder: (context, child) => _buildBody(context));
  }

  Widget _buildBody(BuildContext context) {
    final dobInputModel = Provider.of<DateOfBirthInputModel>(context);

    return SizedBox(
      height: PageSizeExpert.pageHeight(context),
      width: PageSizeExpert.pageWidth(context),
      child: Padding(
        padding: theme.commonEdgeInsets,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const SizedBox(height: theme.largeSpacing),
            Text(
              _l10n.accountLinking_QrCodeDecryptionScreenTitle,
              style: Theme.of(context).textTheme.headline1,
            ),
            const SizedBox(height: theme.extraSmallSpacing),
            Text(
              _l10n.accountLinking_QrCodeDecryptionScreenDescription,
            ),
            const SizedBox(height: theme.extraLargeSpacing),
            Text(
              _l10n.accountLinking_QrCodeDecryptionDateOfBirthEntryHeader,
              style: Theme.of(context).textTheme.headline3,
            ),
            const SizedBox(height: theme.smallSpacing),
            DateOfBirthInput(dobInputModel: dobInputModel),
            const SizedBox(height: theme.smallSpacing),
            if (hasError)
              ErrorDisplay(
                  errorMessage:
                      _l10n.accountLinking_QrCodeDecryptionErrorMessage),
            const Spacer(),
            ElevatedButton(
              onPressed: _decryptButtonCallback(dobInputModel, context),
              child: Text(
                _l10n.general_confirmButtonLabel,
              ),
            ),
            const SizedBox(height: theme.extraSmallSpacing),
            _cancelButton(),
          ],
        ),
      ),
    );
  }

  VoidCallback? _decryptButtonCallback(
      DateOfBirthInputModel dobInputModel, BuildContext context) {
    if (_encryptionInProgress) {
      // disable decrypt button
      return null;
    } else {
      return () {
        if (dobInputModel.isValid()) {
          setState(() {
            _encryptionInProgress = true;
          });
          _decrypt(dobInputModel, widget.encryptedQrCode)
              .then((decryptedQrCode) => widget.handleDecryptedQrCodeCallback(
                  context, decryptedQrCode, widget.encryptedQrCode))
              .onError((error, stackTrace) {
            handleDecryptionErrorCase(context);
          });
        }
      };
    }
  }

  Future<String> _decrypt(
      DateOfBirthInputModel dobInputModel, String encryptedQrCode) async {
    String dobString = buildDateOfBirthString(dobInputModel);
    return await QrCodeDecrypter.decryptMessage(dobString, encryptedQrCode);
  }

  void handleDecryptionErrorCase(BuildContext context) {
    if (failedAttempts + 1 > maxFailedAttempts) {
      context.read<AccountLinkingStateManager>().updateQrDecryptionFailed(true);
    } else {
      setState(() {
        hasError = true;
        failedAttempts += 1;
        _encryptionInProgress = false;
      });
    }
  }

  OutlinedButton _cancelButton() {
    return OutlinedButton(
      onPressed: () => context.read<AccountLinkingStateManager>().deleteState(),
      style: theme.cancelButtonStyle(),
      child: Text(
        _l10n.general_cancelButtonLabel,
      ),
    );
  }

  String buildDateOfBirthString(DateOfBirthInputModel dobInputModel) {
    String dobString =
        '${dobInputModel.year}-${dobInputModel.month}-${dobInputModel.day}';
    return dobString;
  }
}
Welches Widget nimmt zu viel Platz weg?