subPage method

  1. @override
Future<Either<Failure, Unit>> subPage({
  1. required String subPage,
  2. required String page,
})
override

Implementation

@override
Future<Either<Failure, Unit>> subPage({
  required String subPage,
  required String page,
}) {
  return trying(() async {
    final path =
        'lib/presentation/pages/$page/sub_pages/$subPage.sub.page.dart';
    await fileManager.generatePath(path);
    final content = await dataSource.page(subPage);
    await fileManager.write(path, content);
  });
}