Es wird nur ein Overflow in der Breite erzeugt weil das Logo zu nah an den Copyright kommt. Es muss früher von einer Row in die Column gewechselt werden. Wo und wie mache ich das? Und die volle Breite soll wie bei Tablet und Desktop beibehalten werden.
import ‘package:flutter/foundation.dart’;
import ‘package:flutter/gestures.dart’;
import ‘package:flutter/material.dart’;
import ‘package:flutter_gen/gen_l10n/patient_app_localizations.dart’;
import ‘package:patient_app/terms_and_conditions_config.dart’;
import ‘package:patient_app/settings.dart’ show AppSettingsProvider;
import ‘package:patient_app/theme/patient_app_colors.dart’;
import ‘package:patient_app/theme/patient_app_theme.dart’ as theme;
import ‘package:patient_app/tools/legal_dialog_provider.dart’;
import ‘package:patient_app/widgets/footer/language_selector.dart’;
import ‘package:provider/provider.dart’;
import ‘package:responsive_framework/responsive_framework.dart’;

class Footer extends StatelessWidget {
const Footer({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
final responsive = ResponsiveBreakpoints.of(context);

if (kIsWeb) {
return Container(
padding: theme.footerEdgeInsets,
color: AppColors.grey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: theme.smallSpacing),
ResponsiveRowColumn(
layout: responsive.smallerThan(DESKTOP)
? ResponsiveRowColumnType.COLUMN
: ResponsiveRowColumnType.ROW,
columnCrossAxisAlignment: CrossAxisAlignment.start,
children: [
const ResponsiveRowColumnItem(
child: LanguageSelector(),
),
ResponsiveRowColumnItem(
child: responsive.smallerThan(DESKTOP)
? const SizedBox(height: theme.mediumSpacing)
: const SizedBox(width: theme.mediumSpacing),
),
ResponsiveRowColumnItem(
child: _buildConditionPolicyDisclaimer(context),
),
],
),
const SizedBox(height: theme.largeSpacing),
ResponsiveRowColumn(
columnVerticalDirection: VerticalDirection.up,
layout: responsive.isMobile
? ResponsiveRowColumnType.COLUMN
: ResponsiveRowColumnType.ROW,
columnMainAxisAlignment: MainAxisAlignment.start,
columnCrossAxisAlignment: CrossAxisAlignment.start,
children: [
ResponsiveRowColumnItem(
child: _buildCopyright(context),
),
ResponsiveRowColumnItem(
child: responsive.smallerThan(TABLET)
? const SizedBox(height: theme.mediumSpacing)
: const Spacer(),
),
ResponsiveRowColumnItem(
child: _buildLogo(),
),
]),
],
),
);
} else {
return const SizedBox();
}
}

Widget _buildCopyright(BuildContext context) {
return FittedBox(
child: Text(
AppLocalizations.of(context)!.copyright(DateTime.now().year),
style: const TextStyle(
fontSize: theme.minimumFontSize,
fontWeight: FontWeight.bold,
color: AppColors.blackOpacity130,
),
),
);
}

Widget _buildLogo() {
return Image.asset(
AppSettingsProvider().assets.poweredByOpascaLogoImage,
width: theme.poweredByOpascaWidthModifier,
);
}

Widget _buildConditionPolicyDisclaimer(BuildContext context) {
final responsive = ResponsiveBreakpoints.of(context);

final showTermsAndConditions = context.select(
(TermsAndConditionsConfig termsAndConditionsConfig) =>
termsAndConditionsConfig.showTermsAndConditions);

return ResponsiveRowColumn(
layout: responsive.isMobile
? ResponsiveRowColumnType.COLUMN
: ResponsiveRowColumnType.ROW,
columnMainAxisAlignment: MainAxisAlignment.start,
columnCrossAxisAlignment: CrossAxisAlignment.start,
children: [
if (showTermsAndConditions)
ResponsiveRowColumnItem(
child: RichText(
text: TextSpan(
text: AppLocalizations.of(context)!.legal_conditionsOfUse,
style: theme.footerTextStyle,
recognizer: TapGestureRecognizer()
…onTap = () {
LegalDialogProvider.showTermsAndConditionsDialog(context);
}),
)),
if (showTermsAndConditions)
ResponsiveRowColumnItem(
child: responsive.smallerThan(TABLET)
? const SizedBox(height: theme.extraSmallSpacing)
: const SizedBox(width: theme.mediumSpacing),
),
ResponsiveRowColumnItem(
child: RichText(
text: TextSpan(
text: AppLocalizations.of(context)!.legal_privacyNotice,
style: theme.footerTextStyle,
recognizer: TapGestureRecognizer()
…onTap = () {
LegalDialogProvider.showPrivatePolicyDialog(context);
}),
)),
ResponsiveRowColumnItem(
child: responsive.smallerThan(TABLET)
? const SizedBox(height: theme.extraSmallSpacing)
: const SizedBox(width: theme.mediumSpacing),
),
ResponsiveRowColumnItem(
child: RichText(
text: TextSpan(
text: AppLocalizations.of(context)!.legal_disclaimer,
style: theme.footerTextStyle,
recognizer: TapGestureRecognizer()
…onTap = () {
LegalDialogProvider.showDisclaimerDialog(context);
}),
)),
]);
}
}