refactor(glossary): Removed unused model argument

This commit is contained in:
2024-05-24 15:26:32 +03:00
parent 1c17a93428
commit 563024a661
2 changed files with 7 additions and 11 deletions

View File

@@ -13,11 +13,10 @@ import 'package:eatvio_app/presentation/glossary/glossary_screen/widgets/glossar
class GlossaryScreen extends StatelessWidget {
const GlossaryScreen({Key? key}) : super(key: key);
static Widget builder(BuildContext context) {
final glossaryID = ModalRoute.of(context)!.settings.arguments;
return BlocProvider<GlossaryBloc>(
create: (context) => GlossaryBloc(GlossaryState(
glossaryModelObj: GlossaryModel(glossaryID: glossaryID.toString())))
..add(GlossaryInitialEvent()),
create: (context) =>
GlossaryBloc(GlossaryState(glossaryModelObj: GlossaryModel()))
..add(GlossaryInitialEvent()),
child: GlossaryScreen());
}

View File

@@ -6,14 +6,11 @@ import 'package:equatable/equatable.dart';
/// and is typically used to hold data that is passed between different parts of the application.
class GlossaryModel extends Equatable {
final String glossaryID;
GlossaryModel({required String glossaryID}) : glossaryID = glossaryID;
GlossaryModel copyWith(String glossaryID) {
return GlossaryModel(glossaryID: glossaryID);
GlossaryModel();
GlossaryModel copyWith() {
return GlossaryModel();
}
@override
List<Object?> get props => [glossaryID];
List<Object?> get props => [];
}