20 lines
765 B
Python
20 lines
765 B
Python
import re
|
|
|
|
with open('kifi-app/lib/features/dashboard/presentation/dashboard_screen.dart', 'r') as f:
|
|
content = f.read()
|
|
|
|
content = content.replace("import '../../projects/presentation/projects_screen.dart';", "import '../../projects/presentation/project_hub_screen.dart';\nimport '../../projects/presentation/projects_screen.dart';")
|
|
|
|
old_projects_mode = r""" if \(isProjectMode\) {
|
|
screens\.add\(const ProjectsScreen\(\)\);
|
|
}"""
|
|
|
|
new_projects_mode = """ if (isProjectMode) {
|
|
screens.add(const ProjectHubScreen());
|
|
}"""
|
|
|
|
content = re.sub(old_projects_mode, new_projects_mode, content)
|
|
|
|
with open('kifi-app/lib/features/dashboard/presentation/dashboard_screen.dart', 'w') as f:
|
|
f.write(content)
|