Project management related changes
This commit is contained in:
39
scratch/patch_hub_inkwell.py
Normal file
39
scratch/patch_hub_inkwell.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import re
|
||||
|
||||
with open('kifi-app/lib/features/projects/presentation/project_hub_screen.dart', 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
old_banner = r""" Container\(
|
||||
padding: const EdgeInsets\.all\(16\),
|
||||
decoration: BoxDecoration\(
|
||||
color: Theme\.of\(context\)\.colorScheme\.primary\.withOpacity\(0\.1\),
|
||||
borderRadius: BorderRadius\.circular\(16\),
|
||||
border: Border\.all\(color: Theme\.of\(context\)\.colorScheme\.primary\.withOpacity\(0\.2\)\),
|
||||
\),"""
|
||||
|
||||
new_banner = """ InkWell(
|
||||
onTap: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (context) => const BusinessProfileFormSheet(),
|
||||
);
|
||||
},
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.2)),
|
||||
),"""
|
||||
|
||||
content = re.sub(old_banner, new_banner, content)
|
||||
content = content.replace(" const SizedBox(height: 24),\n GridView.count(", " ),\n ),\n const SizedBox(height: 24),\n GridView.count(")
|
||||
|
||||
if "BusinessProfileFormSheet" not in content:
|
||||
content = content.replace("import '../../vendor/presentation/vendors_list_screen.dart';", "import '../../vendor/presentation/vendors_list_screen.dart';\nimport '../../business/presentation/widgets/business_profile_form_sheet.dart';")
|
||||
|
||||
with open('kifi-app/lib/features/projects/presentation/project_hub_screen.dart', 'w') as f:
|
||||
f.write(content)
|
||||
Reference in New Issue
Block a user