refactor: reorder field declarations for improved readability and add explicit type parameters
This commit is contained in:
@@ -7,15 +7,15 @@ import '../../domain/repositories/hub_repository_interface.dart';
|
|||||||
|
|
||||||
/// Implementation of [HubRepositoryInterface] backed by Data Connect.
|
/// Implementation of [HubRepositoryInterface] backed by Data Connect.
|
||||||
class HubRepositoryImpl implements HubRepositoryInterface {
|
class HubRepositoryImpl implements HubRepositoryInterface {
|
||||||
final firebase.FirebaseAuth _firebaseAuth;
|
|
||||||
final dc.ExampleConnector _dataConnect;
|
|
||||||
|
|
||||||
HubRepositoryImpl({
|
HubRepositoryImpl({
|
||||||
required firebase.FirebaseAuth firebaseAuth,
|
required firebase.FirebaseAuth firebaseAuth,
|
||||||
required dc.ExampleConnector dataConnect,
|
required dc.ExampleConnector dataConnect,
|
||||||
}) : _firebaseAuth = firebaseAuth,
|
}) : _firebaseAuth = firebaseAuth,
|
||||||
_dataConnect = dataConnect;
|
_dataConnect = dataConnect;
|
||||||
|
|
||||||
|
final firebase.FirebaseAuth _firebaseAuth;
|
||||||
|
final dc.ExampleConnector _dataConnect;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<domain.Hub>> getHubs() async {
|
Future<List<domain.Hub>> getHubs() async {
|
||||||
final dc.GetBusinessesByUserIdBusinesses business = await _getBusinessForCurrentUser();
|
final dc.GetBusinessesByUserIdBusinesses business = await _getBusinessForCurrentUser();
|
||||||
@@ -88,8 +88,8 @@ class HubRepositoryImpl implements HubRepositoryInterface {
|
|||||||
id: cachedBusiness.id,
|
id: cachedBusiness.id,
|
||||||
businessName: cachedBusiness.businessName,
|
businessName: cachedBusiness.businessName,
|
||||||
userId: _firebaseAuth.currentUser?.uid ?? '',
|
userId: _firebaseAuth.currentUser?.uid ?? '',
|
||||||
rateGroup: const dc.Known(dc.BusinessRateGroup.STANDARD),
|
rateGroup: const dc.Known<dc.BusinessRateGroup>(dc.BusinessRateGroup.STANDARD),
|
||||||
status: const dc.Known(dc.BusinessStatus.ACTIVE),
|
status: const dc.Known<dc.BusinessStatus>(dc.BusinessStatus.ACTIVE),
|
||||||
contactName: cachedBusiness.contactName,
|
contactName: cachedBusiness.contactName,
|
||||||
companyLogoUrl: cachedBusiness.companyLogoUrl,
|
companyLogoUrl: cachedBusiness.companyLogoUrl,
|
||||||
phone: null,
|
phone: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user