Skip to content

Commit

Permalink
[Presentation] Fow now the material detail page is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Mar 18, 2021
1 parent 48275cc commit 10fc5d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -16,6 +16,7 @@ class MaterialItem extends StatelessWidget {
@required this.quantity,
}) : super(key: key);

//TODO: GO TO THE MATERIALS PAGE
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
Expand Down
5 changes: 5 additions & 0 deletions lib/presentation/shared/material_item_button.dart
@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:genshindb/application/bloc.dart';
import 'package:genshindb/generated/l10n.dart';
import 'package:genshindb/presentation/material/material_page.dart' as mp;
import 'package:genshindb/presentation/shared/utils/toast_utils.dart';

class MaterialItemButton extends StatelessWidget {
final String image;
Expand All @@ -26,6 +28,9 @@ class MaterialItemButton extends StatelessWidget {
}

Future<void> _gotoMaterialPage(BuildContext context) async {
final s = S.of(context);
ToastUtils.showWarningToast(s.comingSoon);
return;
final bloc = context.read<MaterialBloc>();
bloc.add(MaterialEvent.loadFromImg(image: image));
final route = MaterialPageRoute(builder: (c) => mp.MaterialPage());
Expand Down

0 comments on commit 10fc5d5

Please sign in to comment.