28 lines
1.5 KiB
Python
28 lines
1.5 KiB
Python
import re
|
|
|
|
with open('kifi-app/lib/features/projects/presentation/widgets/add_task_sheet.dart', 'r') as f:
|
|
content = f.read()
|
|
|
|
content = content.replace("import '../../../../core/widgets/bottom_sheet_container.dart';", "")
|
|
content = content.replace(" return BottomSheetContainer(\n title: 'New Task',\n child: Form(",
|
|
" return Container(\n padding: EdgeInsets.only(\n bottom: MediaQuery.of(context).viewInsets.bottom,\n left: 24,\n right: 24,\n top: 24,\n ),\n decoration: const BoxDecoration(\n color: Colors.white,\n borderRadius: BorderRadius.vertical(top: Radius.circular(24)),\n ),\n child: SafeArea(\n child: Form(")
|
|
|
|
header = """ children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
const Text('New Task', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
|
|
IconButton(icon: const Icon(LucideIcons.x), onPressed: () => Navigator.pop(context)),
|
|
],
|
|
),
|
|
const SizedBox(height: 16),
|
|
PremiumTextField("""
|
|
|
|
content = content.replace(" children: [\n PremiumTextField(", header)
|
|
|
|
content = content.replace(" );\n }\n", " ),\n );\n }\n") # Adding missing parenthesis for SafeArea and Container
|
|
|
|
with open('kifi-app/lib/features/projects/presentation/widgets/add_task_sheet.dart', 'w') as f:
|
|
f.write(content)
|
|
|