Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 68 additions & 20 deletions edu_play/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,39 +1,87 @@
import 'package:edu_play/screens/onboarding_screen.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

void main() {
runApp(const MyApp());
runApp(const SoulsticeApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});
class SoulsticeApp extends StatelessWidget {
const SoulsticeApp({super.key});

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'EduPlay',
title: 'Soulstice',
theme: ThemeData(
// Define the default brightness and colors.
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: const Color(0xFF3B82F6), // Primary: Sky Blue
primary: const Color(0xFF3B82F6),
secondary: const Color(0xFFFACC15), // Accent: Warm Yellow
error: const Color(0xFFF87171), // Secondary: Coral Red
// Other colors can be defined here as needed
seedColor: const Color(0xFF8A9A5B), // Sage Green
primary: const Color(0xFF8A9A5B),
secondary: const Color(0xFFC07A50), // Clay Orange
tertiary: const Color(0xFF483C32), // Taupe
surface: const Color(0xFFFDFBF7), // Neutral/Cream
),

// Define the default font family.
textTheme: GoogleFonts.nunitoTextTheme(
textTheme: GoogleFonts.interTextTheme(
Theme.of(context).textTheme,
).copyWith(
displayLarge: GoogleFonts.playfairDisplay(
textStyle: Theme.of(context).textTheme.displayLarge,
fontWeight: FontWeight.bold,
),
displayMedium: GoogleFonts.playfairDisplay(
textStyle: Theme.of(context).textTheme.displayMedium,
fontWeight: FontWeight.bold,
),
displaySmall: GoogleFonts.playfairDisplay(
textStyle: Theme.of(context).textTheme.displaySmall,
fontWeight: FontWeight.bold,
),
headlineLarge: GoogleFonts.playfairDisplay(
textStyle: Theme.of(context).textTheme.headlineLarge,
fontWeight: FontWeight.bold,
),
headlineMedium: GoogleFonts.playfairDisplay(
textStyle: Theme.of(context).textTheme.headlineMedium,
fontWeight: FontWeight.bold,
),
headlineSmall: GoogleFonts.playfairDisplay(
textStyle: Theme.of(context).textTheme.headlineSmall,
fontWeight: FontWeight.bold,
),
),

// Use Material 3 design.
useMaterial3: true,
),
home: const OnboardingScreen(),
home: const PlaceholderHomeScreen(),
debugShowCheckedModeBanner: false,
);
}
}
}

class PlaceholderHomeScreen extends StatelessWidget {
const PlaceholderHomeScreen({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
'Soulstice',
style: Theme.of(context).textTheme.headlineMedium,
),
centerTitle: true,
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Welcome to Soulstice',
style: Theme.of(context).textTheme.headlineLarge,
),
const SizedBox(height: 20),
const Text('Core Data Architecture Foundation is being built...'),
],
),
),
);
}
}
35 changes: 35 additions & 0 deletions edu_play/lib/models/client_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class Client {
final int? id;
final String name;
final String email;
final String phone;
final String company;

Client({
this.id,
required this.name,
this.email = '',
this.phone = '',
this.company = '',
});

Map<String, dynamic> toMap() {
return {
'id': id,
'name': name,
'email': email,
'phone': phone,
'company': company,
};
}

factory Client.fromMap(Map<String, dynamic> map) {
return Client(
id: map['id'],
name: map['name'],
email: map['email'] ?? '',
phone: map['phone'] ?? '',
company: map['company'] ?? '',
);
}
}
37 changes: 37 additions & 0 deletions edu_play/lib/models/habit_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
class Habit {
final int? id;
final String name;
final String frequency; // 'Daily', 'Weekly'
final int streak;
final DateTime? lastCompleted;

Habit({
this.id,
required this.name,
this.frequency = 'Daily',
this.streak = 0,
this.lastCompleted,
});

Map<String, dynamic> toMap() {
return {
'id': id,
'name': name,
'frequency': frequency,
'streak': streak,
'lastCompleted': lastCompleted?.toIso8601String(),
};
}

factory Habit.fromMap(Map<String, dynamic> map) {
return Habit(
id: map['id'],
name: map['name'],
frequency: map['frequency'] ?? 'Daily',
streak: map['streak'] ?? 0,
lastCompleted: map['lastCompleted'] != null
? DateTime.parse(map['lastCompleted'])
: null,
);
}
}
12 changes: 0 additions & 12 deletions edu_play/lib/models/lesson_model.dart

This file was deleted.

35 changes: 35 additions & 0 deletions edu_play/lib/models/project_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class Project {
final int? id;
final String name;
final String description;
final double progress;
final String status;

Project({
this.id,
required this.name,
this.description = '',
this.progress = 0.0,
this.status = 'Active',
});

Map<String, dynamic> toMap() {
return {
'id': id,
'name': name,
'description': description,
'progress': progress,
'status': status,
};
}

factory Project.fromMap(Map<String, dynamic> map) {
return Project(
id: map['id'],
name: map['name'],
description: map['description'] ?? '',
progress: (map['progress'] ?? 0.0).toDouble(),
status: map['status'] ?? 'Active',
);
}
}
14 changes: 0 additions & 14 deletions edu_play/lib/models/quiz_model.dart

This file was deleted.

35 changes: 35 additions & 0 deletions edu_play/lib/models/resource_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class Resource {
final int? id;
final String title;
final String content;
final String type; // 'Note', 'Link', 'Document'
final int? projectId;

Resource({
this.id,
required this.title,
this.content = '',
this.type = 'Note',
this.projectId,
});

Map<String, dynamic> toMap() {
return {
'id': id,
'title': title,
'content': content,
'type': type,
'projectId': projectId,
};
}

factory Resource.fromMap(Map<String, dynamic> map) {
return Resource(
id: map['id'],
title: map['title'],
content: map['content'] ?? '',
type: map['type'] ?? 'Note',
projectId: map['projectId'],
);
}
}
14 changes: 0 additions & 14 deletions edu_play/lib/models/reward_model.dart

This file was deleted.

55 changes: 55 additions & 0 deletions edu_play/lib/models/task_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
class Task {
final int? id;
final String title;
final String description;
final bool isCompleted;
final DateTime? dueDate;
final String energyLevel; // 'High', 'Low'
final String category; // 'Today', 'Active', 'Incubator', 'Leads'
final int? projectId;
final int? clientId;
final DateTime? updatedAt;

Task({
this.id,
required this.title,
this.description = '',
this.isCompleted = false,
this.dueDate,
this.energyLevel = 'High',
this.category = 'Active',
this.projectId,
this.clientId,
this.updatedAt,
});

Map<String, dynamic> toMap() {
return {
'id': id,
'title': title,
'description': description,
'isCompleted': isCompleted ? 1 : 0,
'dueDate': dueDate?.toIso8601String(),
'energyLevel': energyLevel,
'category': category,
'projectId': projectId,
'clientId': clientId,
'updatedAt': updatedAt?.toIso8601String() ?? DateTime.now().toIso8601String(),
};
}

factory Task.fromMap(Map<String, dynamic> map) {
return Task(
id: map['id'],
title: map['title'],
description: map['description'] ?? '',
isCompleted: map['isCompleted'] == 1,
dueDate: map['dueDate'] != null ? DateTime.parse(map['dueDate']) : null,
energyLevel: map['energyLevel'] ?? 'High',
category: map['category'] ?? 'Active',
projectId: map['projectId'],
clientId: map['clientId'],
updatedAt: map['updatedAt'] != null ? DateTime.parse(map['updatedAt']) : null,
);
}
}
13 changes: 0 additions & 13 deletions edu_play/lib/models/user_model.dart

This file was deleted.

15 changes: 0 additions & 15 deletions edu_play/lib/screens/admin_dashboard_screen.dart

This file was deleted.

Loading