Woher erhält Das Location Icon seine Farbe?
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/patient_app_localizations.dart';
import 'package:patient_app/models/location.dart';
import 'package:patient_app/theme/patient_app_theme.dart' as theme;
import 'package:patient_app/tools/launcher_expert.dart';
import 'package:patient_app/widgets/patient_app_card.dart';

class NavigationLauncher extends StatelessWidget {
  const NavigationLauncher(
      {Key? key, required this.geoLabel, required this.geoLocation})
      : super(key: key);

  final String geoLabel;
  final Position geoLocation;

  @override
  Widget build(BuildContext context) {
    AppLocalizations l10n = AppLocalizations.of(context)!;
    return PatientAppCard(
      action: LauncherExpert.createLaunchMapCallback(geoLabel, geoLocation),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Text(
                  l10n.appointmentDetailsLocationMapHeader,
                  style: Theme.of(context).textTheme.headline3,
                ),
                const SizedBox(height: theme.atomSpacing),
                Text(l10n.appointmentDetailsLocationMapAction)
              ],
            ),
          ),
          const Icon(Icons.location_on_outlined),
        ],
      ),
    );
  }
}
import 'package:flutter/material.dart';
import 'package:patient_app/theme/patient_app_colors.dart';
import 'package:patient_app/theme/patient_app_theme.dart' as theme;
import 'package:patient_app/widgets/overlay_ink.dart';

class PatientAppCard extends StatelessWidget {
  final VoidCallback? action;
  final Widget? child;
  final Color? color;
  final double? padding;
  final BorderSide? side;

  const PatientAppCard(
      {Key? key, this.action, this.child, this.color, this.padding, this.side})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Card(
      shape: RoundedRectangleBorder(
        borderRadius: theme.cardBorderRadius,
        side: side ?? BorderSide.none,
      ),
      color: _color,
      elevation: theme.cardElevation,
      margin: EdgeInsets.zero,
      child: _buildMainContent(),
    );
  }

  Widget _buildMainContent() {
    if (action != null) {
      return Stack(
        children: [
          _buildBody(),
          OverlayInk(borderRadius: theme.cardBorderRadius, onTap: action!),
        ],
      );
    } else {
      return _buildBody();
    }
  }

  Widget _buildBody() {
    return Padding(
      padding: _padding,
      child: child,
    );
  }

  Color get _color => color ?? AppColors.cardColor;

  EdgeInsets get _padding =>
      padding == null ? theme.extraSmallEdgeInsets : EdgeInsets.all(padding!);
}
