Skip to content

Commit

Permalink
Add maybeArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
raapperez committed Aug 30, 2024
1 parent b70ea30 commit 42afd42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/nu_route_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';

/// [name] will be the full DeepLink String
class NuRouteSettings<A extends Object?> extends RouteSettings {
class NuRouteSettings<A> extends RouteSettings {
const NuRouteSettings({
required String name,
required this.pathTemplate,
Expand All @@ -27,7 +27,9 @@ class NuRouteSettings<A extends Object?> extends RouteSettings {
};
}

A? get args => arguments as A?;
A get args => arguments !as A;

A? get maybeArgs => arguments as A?;

@override
String toString() =>
Expand Down

0 comments on commit 42afd42

Please sign in to comment.