Content insert support

This commit is contained in:
2025-02-18 00:43:12 +08:00
parent 972b304969
commit a5629975ed
4 changed files with 15 additions and 0 deletions

View File

@@ -602,6 +602,7 @@ class _PostStoryEditor extends StatelessWidget {
border: InputBorder.none,
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
contentInsertionConfiguration: controller.contentInsertionConfiguration,
),
],
),
@@ -665,6 +666,7 @@ class _PostArticleEditor extends StatelessWidget {
keyboardType: TextInputType.multiline,
style: Theme.of(context).textTheme.bodyLarge,
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
contentInsertionConfiguration: controller.contentInsertionConfiguration,
).padding(horizontal: 16),
const Gap(4),
];
@@ -692,6 +694,7 @@ class _PostArticleEditor extends StatelessWidget {
border: InputBorder.none,
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
contentInsertionConfiguration: controller.contentInsertionConfiguration,
),
),
const Gap(8),
@@ -726,6 +729,7 @@ class _PostArticleEditor extends StatelessWidget {
border: InputBorder.none,
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
contentInsertionConfiguration: controller.contentInsertionConfiguration,
),
),
],
@@ -797,6 +801,7 @@ class _PostQuestionEditor extends StatelessWidget {
border: InputBorder.none,
),
onTapOutside: (_) => FocusManager.instance.primaryFocus?.unfocus(),
contentInsertionConfiguration: controller.contentInsertionConfiguration,
),
],
),