forked from eatvio/eatvio_app
refactor(glossary): Removed unused model argument
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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 => [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user