search for books

This commit is contained in:
Dr-Blank 2024-06-05 12:08:44 -04:00
parent a1e238fc25
commit d372a6b096
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
12 changed files with 963 additions and 88 deletions

View file

@ -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' : ''}';
}