Skip to content

Commit

Permalink
Change implementation of StatelessNavigator to be based upon `State…
Browse files Browse the repository at this point in the history
…fulNavigator`
  • Loading branch information
tp committed Sep 4, 2024
1 parent 1e5195f commit 3be7109
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/src/declarative_navigatable/stateless_navigator.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import 'package:fdr/fdr.dart';

abstract class StatelessNavigator extends MappedNavigatableSource<void> {
StatelessNavigator() : super(initialState: null);
abstract class StatelessNavigator extends StatefulNavigator {
List<DeclarativeNavigatable> build();

@override
List<DeclarativeNavigatable> build();
StatefulNavigatorState<StatefulNavigator> createState() =>
_StatelessNavigatorState();
}

class _StatelessNavigatorState extends StatefulNavigatorState {
@override
List<DeclarativeNavigatable> build() {
return (navigator as StatelessNavigator).build();
}
}

0 comments on commit 3be7109

Please sign in to comment.