Skip to content

Commit

Permalink
feat: Doc Comments updated
Browse files Browse the repository at this point in the history
  • Loading branch information
devtronic committed Dec 30, 2022
1 parent 186b114 commit 495d76c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/src/material_route_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';

import 'route_builder.dart';

/// Material implementation of the RouteBuilder.
class MaterialRouteBuilder implements RouteBuilder {
@override
Route build(WidgetBuilder builder, RouteSettings settings) {
Expand Down
3 changes: 3 additions & 0 deletions lib/src/route_builder.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:flutter/widgets.dart';

/// The RouteBuilder is used to create [Route]s.
abstract class RouteBuilder {
/// This method returns a [Route] which lead to a screen that shows [Widget]
/// built by the [builder].
Route build(WidgetBuilder builder, RouteSettings settings);
}
2 changes: 1 addition & 1 deletion lib/src/route_expression_builder.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'exception/unbalanced_curly_braces_exception.dart';
import 'exception/unexpected_char_exception.dart';

/// Provides functionality for building route paths to expressions.
/// Provides functionality for converting route paths to expressions.
class RouteExpressionBuilder {
final String _path;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/route_provider.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'registered_route.dart';

/// This interface describe a object that can provide routes.
abstract class RouteProvider {
/// Returns the existing routes.
List<RegisteredRoute> get routes;
}
7 changes: 7 additions & 0 deletions lib/src/route_resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import 'package:catalyst_builder/catalyst_builder.dart';
import 'package:explorator/explorator.dart';
import 'package:flutter/widgets.dart';

/// The RouteResolver is used to resolve [Route]s from [RouteSettings].
/// All possible routes are provided by the [RouteProvider]s which are injected
/// by the routeProvider tag.
@Service()
class RouteResolver {
final List<RouteProvider> _providers;
Expand Down Expand Up @@ -48,6 +51,10 @@ class RouteResolver {
return null;
}

/// Creates a enhanced service provider which contains additional services:
/// [RouteArguments] The arguments for the route which was resolved.
/// This contains query parameters and path variables
/// [RouteSettings] The [RouteSettings] for the resolved route.
ServiceProvider _createSubProvider(
Map<String, String> pathVariables,
Map<String, String> queryParameters,
Expand Down

0 comments on commit 495d76c

Please sign in to comment.