fix(router): adjust type check for extra parameter in navigation
fix(import): ensure correct typing for passing markdown and imageUrl fix(recipes): delete local image file on recipe deletion to avoid orphan files
This commit is contained in:
@@ -71,7 +71,9 @@ final appRouterProvider = Provider<GoRouter>((ref) {
|
||||
final extra = state.extra;
|
||||
String? initialMarkdown;
|
||||
String? initialImageUrl;
|
||||
if (extra is Map<String, dynamic>) {
|
||||
// Use 'is Map' without type params — Dart reifies generics, so
|
||||
// Map<String,String?> does NOT match Map<String,dynamic> at runtime.
|
||||
if (extra is Map) {
|
||||
initialMarkdown = extra['markdown'] as String?;
|
||||
initialImageUrl = extra['imageUrl'] as String?;
|
||||
} else if (extra is String) {
|
||||
|
||||
Reference in New Issue
Block a user