Cast list object to another list object – Flutter
How can I cast List<TenancyEntity> to List<Tenancy> ? I use below code but get exception var a = await _tenancyLocalDataSource.getTenancyList(); var b = a!.cast<Tenancy>(); debugPrint(b.toString()); Below are the both classes TenancyEntity import 'package:hive/hive.dart'; import '../../../domain/model/tenancy.dart'; part 'tenancy_entity.g.dart'; @HiveType(typeId: 1) class…