routedColor method

dynamic routedColor(
  1. dynamic context,
  2. dynamic ref,
  3. dynamic route
)

Implementation

Color? routedColor(BuildContext context, WidgetRef ref, Routes route) {
  final currentRoute = ref.watch(currentRoutingLocation);
  if (currentRoute == route.route) {
    return Theme.of(context).colorScheme.secondary;
  } else {
    return null;
  }
}