fix: Firebase implementation

This commit is contained in:
Jacques 2024-01-29 16:07:16 +01:00
parent 179841f930
commit 1fc7c8d2de
5 changed files with 7 additions and 7 deletions

View file

@ -10,7 +10,7 @@ import 'package:go_router/go_router.dart';
List<GoRoute> getTimelineStoryRoutes({
TimelineUserStoryConfiguration? configuration,
}) {
var config = configuration ??= TimelineUserStoryConfiguration(
var config = configuration ?? TimelineUserStoryConfiguration(
userId: 'test_user',
service: TimelineService(
postService: LocalTimelinePostService(),

View file

@ -9,9 +9,9 @@ import 'package:flutter_timeline_view/flutter_timeline_view.dart';
@immutable
class TimelineUserStoryConfiguration {
const TimelineUserStoryConfiguration({
required this.userId,
required this.service,
required this.optionsBuilder,
this.userId = 'test_user',
this.openPageBuilder,
this.onPostTap,
this.onUserTap,

View file

@ -7,4 +7,5 @@ library flutter_timeline_firebase;
export 'src/config/firebase_timeline_options.dart';
export 'src/service/firebase_post_service.dart';
export 'src/service/firebase_timeline_service.dart';
export 'src/service/firebase_user_service.dart';

View file

@ -9,8 +9,7 @@ class FirebaseTimelineService implements TimelineService {
this.firebasePostService,
this.firebaseUserService,
}) {
firebaseUserService ??= FirebaseTimelinePostService(
userService: userService,
firebaseUserService ??= FirebaseTimelineUserService(
options: options,
app: app,
);
@ -45,7 +44,7 @@ class FirebaseTimelineService implements TimelineService {
if (firebaseUserService != null) {
return firebaseUserService!;
} else {
return FirebaseUserService(
return FirebaseTimelineUserService(
options: options,
app: app,
);

View file

@ -8,8 +8,8 @@ import 'package:flutter_timeline_firebase/src/config/firebase_timeline_options.d
import 'package:flutter_timeline_firebase/src/models/firebase_user_document.dart';
import 'package:flutter_timeline_interface/flutter_timeline_interface.dart';
class FirebaseUserService implements TimelineUserService {
FirebaseUserService({
class FirebaseTimelineUserService implements TimelineUserService {
FirebaseTimelineUserService({
FirebaseApp? app,
options = const FirebaseTimelineOptions(),
}) {