Skip to content

Commit

Permalink
Merge pull request #111 from IamMuuo/courses
Browse files Browse the repository at this point in the history
Courses Feature
  • Loading branch information
IamMuuo authored Dec 26, 2024
2 parents 9d419c7 + c9736cb commit af25ae0
Show file tree
Hide file tree
Showing 28 changed files with 1,561 additions and 70 deletions.
1 change: 1 addition & 0 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Academia extends StatelessWidget {
providers: [
BlocProvider(create: (_) => AuthCubit()),
BlocProvider(create: (_) => ProfileCubit()),
BlocProvider(create: (_) => CourseCubit()),
],
child: DynamicColorBuilder(
builder: (lightscheme, darkscheme) => MaterialApp.router(
Expand Down
8 changes: 7 additions & 1 deletion lib/database/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:io';
import 'package:academia/features/auth/models/user.dart';
import 'package:academia/features/auth/models/user_credentials.dart';
import 'package:academia/features/auth/models/user_profile.dart';
import 'package:academia/features/courses/models/course.dart';
import 'package:drift/drift.dart';
import 'package:drift/native.dart';
import 'package:drift_flutter/drift_flutter.dart';
Expand Down Expand Up @@ -43,7 +44,12 @@ Future<Directory> _getDatabaseDirectory() async {
}
}

@DriftDatabase(tables: [User, UserProfile, UserCredential])
@DriftDatabase(tables: [
User,
UserProfile,
UserCredential,
Course,
])
class AppDatabase extends _$AppDatabase {
// After generating code, this class needs to define a schemaVersion getter
// and a constructor telling drift where the database should be stored.
Expand Down
Loading

0 comments on commit af25ae0

Please sign in to comment.