iampawan / iampawan/30DaysOfFlutter
Encountered some issues
- Dominant language
- Dart
- Stars
- 418
- Forks
- 315
- PR merge metrics
- No merged PRs in 30d
Description
### Encountered following bugs and applied undermentioned fixes
**items were not initialized -> initialized as empty list**
`static List items = List.empty();`
**required field missing in Item() constructor -> added required keyword**
`Item({required this.id, ....});`
**Null safety found missing in copyWith()**
`Item copyWith({
String? id ...`
**In factory fromMap() the line which checks map nullability throwing error -> commented**
`//if (map == null) return null;`
**In home.dart list was not mapping to model -> distributed into two assignments**
`List list = List.from(productsData)`
`.map((item) => Item.fromMap(item))`
` .toList();`
` CatalogModel.items = list;`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.