docs(authentication): update example with multiple data sources

This commit is contained in:
2023-04-13 23:24:12 +02:00
parent d53e7b80da
commit 4d872edc4e
13 changed files with 261 additions and 41 deletions
@@ -34,6 +34,9 @@ class App extends StatelessWidget {
AuthenticationRepositoryImpl(
authenticationRemoteDataSource:
getIt<AuthenticationRemoteDataSource<int>>(),
authenticationSessionDataSource:
getIt<AuthenticationSessionDataSource<int>>(),
authenticationCacheDataSource: getIt<AuthenticationCacheDataSource<int>>(),
customPasswordValidator: const CustomPassword.pure(),
extraSignUpInputs: [
FormInput(
@@ -45,7 +45,8 @@ class SubPage extends StatelessWidget {
children: [
const Text('Another page'),
ElevatedButton(
onPressed: () => context.read<AuthenticationCubit<int>>().delete(),
onPressed: () =>
context.read<AuthenticationCubit<int>>().delete(),
child: const Text('Delete account'),
),
],