mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-07 03:29:29 +00:00
search for books
This commit is contained in:
parent
a1e238fc25
commit
d372a6b096
12 changed files with 963 additions and 88 deletions
|
|
@ -25,6 +25,15 @@ class Routes {
|
|||
pathName: 'config',
|
||||
name: 'settings',
|
||||
);
|
||||
static const search = _SimpleRoute(
|
||||
pathName: 'search',
|
||||
name: 'search',
|
||||
// parentRoute: library,
|
||||
);
|
||||
static const explore = _SimpleRoute(
|
||||
pathName: 'explore',
|
||||
name: 'explore',
|
||||
);
|
||||
}
|
||||
|
||||
// a class to store path
|
||||
|
|
@ -34,12 +43,17 @@ class _SimpleRoute {
|
|||
required this.pathName,
|
||||
this.pathParamName,
|
||||
required this.name,
|
||||
this.parentRoute,
|
||||
});
|
||||
|
||||
final String pathName;
|
||||
final String? pathParamName;
|
||||
final String name;
|
||||
final _SimpleRoute? parentRoute;
|
||||
|
||||
String get path =>
|
||||
'${parentRoute?.path ?? ''}${parentRoute != null ? '/' : ''}$localPath';
|
||||
|
||||
String get localPath =>
|
||||
'/$pathName${pathParamName != null ? '/:$pathParamName' : ''}';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue