refactor: asset grid
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:immich_mobile/domain/interfaces/asset.interface.dart';
|
||||
import 'package:immich_mobile/presentation/components/grid/immich_asset_grid.state.dart';
|
||||
import 'package:immich_mobile/presentation/components/grid/immich_asset_grid.widget.dart';
|
||||
import 'package:immich_mobile/service_locator.dart';
|
||||
|
||||
@RoutePage()
|
||||
class HomePage extends StatelessWidget {
|
||||
@@ -8,6 +12,14 @@ class HomePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold(body: ImAssetGrid());
|
||||
return Scaffold(
|
||||
body: BlocProvider(
|
||||
create: (_) => ImmichAssetGridCubit(
|
||||
renderStream: di<IAssetRepository>().watchRenderList(),
|
||||
assetProvider: di<IAssetRepository>().fetchAssets,
|
||||
),
|
||||
child: const ImAssetGrid(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user