Skip to content

Conversation

RodolfoSilva
Copy link
Contributor

Right now the RouteGuard interface use guardedRoute param as nullable, but the constructor requires the positional param.

The constructor guardedRoute param should also be optional.

Now you will be able to implements the interface without the constructor:

class MyGuard extends RouteGuard {
  @override
  Future<bool> canActivate(String path, ModularRoute router) async {
    // TODO: implement canActivate
    throw UnimplementedError();
  }
}

Right now the `RouteGuard` interface use `guardedRoute` param as nullable. The constructor `guardedRoute` param should also be optional.

Now you will be able to implements the interface without the constructor:
```dart
class MyGuard extends RouteGuard {
  @OverRide
  Future<bool> canActivate(String path, ModularRoute router) async {
    // TODO: implement canActivate
    throw UnimplementedError();
  }
}
```
@RodolfoSilva RodolfoSilva changed the title feat: set positional constructor param as optional Set positional constructor param as optional Jul 22, 2021
@jacobaraujo7 jacobaraujo7 merged commit 4990dc4 into Flutterando:master Aug 2, 2021
@RodolfoSilva RodolfoSilva deleted the patch-1 branch August 3, 2021 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants