Skip to content

Commit 83ff9bb

Browse files
committed
latest deps
1 parent 6598bd6 commit 83ff9bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+826
-627
lines changed

MobileApp/datn/lib/data/repository/card_repository_impl.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:built_collection/built_collection.dart';
22
import 'package:rxdart/rxdart.dart';
3+
import 'package:rxdart_ext/rxdart_ext.dart';
34

45
import '../../domain/model/card.dart';
56
import '../../domain/repository/card_repository.dart';

MobileApp/datn/lib/data/repository/city_repository_impl.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ class CityRepositoryImpl implements CityRepository {
4747
};
4848

4949
final RxSharedPreferences _preferences;
50-
final ValueConnectableStream<City> _selectedCity$;
50+
final ValueStream<City> _selectedCity$;
5151

5252
CityRepositoryImpl(this._preferences, UserLocalSource userLocalSource)
53-
: _selectedCity$ = _buildSelectedCity(_preferences, userLocalSource)
54-
..connect();
53+
: _selectedCity$ = _buildSelectedCity(_preferences, userLocalSource);
5554

5655
@override
5756
BuiltList<City> get allCities => _allCities;
@@ -63,7 +62,7 @@ class CityRepositoryImpl implements CityRepository {
6362
@override
6463
ValueStream<City> get selectedCity$ => _selectedCity$;
6564

66-
static ValueConnectableStream<City> _buildSelectedCity(
65+
static ValueStream<City> _buildSelectedCity(
6766
RxSharedPreferences prefs,
6867
UserLocalSource userLocalSource,
6968
) {
@@ -77,7 +76,8 @@ class CityRepositoryImpl implements CityRepository {
7776
return prefs
7877
.getStringStream(_city_key)
7978
.map((name) => _allCitiesByName[name] ?? _allCities.first)
80-
.publishValueSeeded(_allCities.first);
79+
.publishValueSeeded(_allCities.first)
80+
..connect();
8181
}
8282

8383
static City _findNearestCityFrom(LocationLocal location) {

MobileApp/datn/lib/data/repository/favorites_repository_impl.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class FavoritesRepositoryImpl implements FavoritesRepository {
7575
(initial) => _changes.scan<BuiltList<Movie>>(
7676
(acc, change, _) {
7777
if (change is _Toggled) {
78-
return acc!.rebuild((b) {
78+
return acc.rebuild((b) {
7979
change.favorite
8080
? b.insert(0, change.movie)
8181
: b.removeWhere((item) => item.id == change.movie.id);

MobileApp/datn/lib/data/repository/user_repository_impl.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class UserRepositoryImpl implements UserRepository {
3939

4040
final SearchKeywordSource _searchKeywordSource;
4141

42-
final ValueStream<Optional<User>> _user$;
42+
final ValueStream<Optional<User>?> _user$;
4343

4444
UserRepositoryImpl(
4545
this._auth,
@@ -62,20 +62,21 @@ class UserRepositoryImpl implements UserRepository {
6262
.getToken()
6363
.then((token) => token != null ? {'fcm_token': token} : null);
6464

65-
static ValueStream<Optional<User>> _buildUserStream(
65+
static ValueStream<Optional<User>?> _buildUserStream(
6666
FirebaseAuth _auth,
6767
UserLocalSource _userLocalSource,
6868
Function1<UserLocal, User> userLocalToUserDomain,
6969
) =>
70-
Rx.combineLatest3<Object?, UserLocal?, String?, Optional<User>>(
71-
_auth.userChanges(),
72-
_userLocalSource.user$,
73-
_userLocalSource.token$,
74-
(Object? user, UserLocal? local, String? token) =>
75-
user == null || local == null || token == null
76-
? Optional.none()
77-
: Optional.some(userLocalToUserDomain(local))).publishValue()
78-
..connect();
70+
Rx.combineLatest3<Object?, UserLocal?, String?, Optional<User>?>(
71+
_auth.userChanges(),
72+
_userLocalSource.user$,
73+
_userLocalSource.token$,
74+
(Object? user, UserLocal? local, String? token) =>
75+
user == null || local == null || token == null
76+
? Optional.none()
77+
: Optional.some(userLocalToUserDomain(local)))
78+
.publishValueSeeded(null)
79+
..connect();
7980

8081
Future<AuthState> _isUserLocalCompletedLogin([UserLocal? local]) async {
8182
local ??= await _userLocalSource.user;
@@ -298,7 +299,7 @@ class UserRepositoryImpl implements UserRepository {
298299
}
299300

300301
@override
301-
ValueStream<Optional<User>> get user$ => _user$;
302+
ValueStream<Optional<User>?> get user$ => _user$;
302303

303304
@override
304305
Future<void> resetPassword(String email) =>

MobileApp/datn/lib/domain/repository/user_repository.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ abstract class UserRepository {
1717
/// - [ValueStream.value] is null when no actual value is emitted.
1818
/// - [ValueStream.value] is [Some] when user logged in.
1919
/// - [ValueStream.value] is [None] when user not logged in.
20-
ValueStream<Optional<User>> get user$;
20+
ValueStream<Optional<User>?> get user$;
2121

2222
Future<AuthState> checkAuth();
2323

MobileApp/datn/lib/generated/intl/messages_all.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ MessageLookupByLibrary? _findExact(String localeName) {
3838
/// User programs should call this before using [localeName] for messages.
3939
Future<bool> initializeMessages(String localeName) async {
4040
var availableLocale = Intl.verifiedLocale(
41-
localeName,
42-
(locale) => _deferredLibraries[locale] != null,
43-
onFailure: (_) => null);
41+
localeName, (locale) => _deferredLibraries[locale] != null,
42+
onFailure: (_) => null);
4443
if (availableLocale == null) {
4544
return new Future.value(false);
4645
}
@@ -60,8 +59,8 @@ bool _messagesExistFor(String locale) {
6059
}
6160

6261
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
63-
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
64-
onFailure: (_) => null);
62+
var actualLocale =
63+
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
6564
if (actualLocale == null) return null;
6665
return _findExact(actualLocale);
6766
}

0 commit comments

Comments
 (0)