Merge pull request #211 from yaso-meth/NEW--field-Spell-check
NEW--field-Spell-check
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MihSearchBar extends StatefulWidget {
|
class MihSearchBar extends StatefulWidget {
|
||||||
@@ -124,6 +125,8 @@ class _MihSearchBarState extends State<MihSearchBar> {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: widget.controller, // Assign the controller
|
controller: widget.controller, // Assign the controller
|
||||||
focusNode: widget.searchFocusNode,
|
focusNode: widget.searchFocusNode,
|
||||||
|
autocorrect: true,
|
||||||
|
spellCheckConfiguration: kIsWeb ? null : SpellCheckConfiguration(),
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
widget.onPrefixIconTap
|
widget.onPrefixIconTap
|
||||||
?.call(); // Call the prefix icon tap handler
|
?.call(); // Call the prefix icon tap handler
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
@@ -152,6 +153,12 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
|
|||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
cursorColor: widget.inputColor,
|
cursorColor: widget.inputColor,
|
||||||
autofillHints: widget.autofillHints,
|
autofillHints: widget.autofillHints,
|
||||||
|
autocorrect: true,
|
||||||
|
spellCheckConfiguration: (kIsWeb ||
|
||||||
|
widget.passwordMode == true ||
|
||||||
|
widget.numberMode == true)
|
||||||
|
? null
|
||||||
|
: SpellCheckConfiguration(),
|
||||||
textAlign:
|
textAlign:
|
||||||
widget.textIputAlignment ?? TextAlign.start,
|
widget.textIputAlignment ?? TextAlign.start,
|
||||||
textAlignVertical: widget.multiLineInput == true
|
textAlignVertical: widget.multiLineInput == true
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ abstract class AppEnviroment {
|
|||||||
case Enviroment.dev:
|
case Enviroment.dev:
|
||||||
{
|
{
|
||||||
//================= Android Dev Urls =================
|
//================= Android Dev Urls =================
|
||||||
baseApiUrl = "http://10.0.2.2:8080";
|
// baseApiUrl = "http://10.0.2.2:8080";
|
||||||
baseFileUrl = "http://10.0.2.2:9000";
|
// baseFileUrl = "http://10.0.2.2:9000";
|
||||||
baseAiUrl = "http://10.0.2.2:11434";
|
// baseAiUrl = "http://10.0.2.2:11434";
|
||||||
//================= Web Dev Urls =================
|
//================= Web Dev Urls =================
|
||||||
// baseApiUrl = "http://localhost:8080";
|
baseApiUrl = "http://localhost:8080";
|
||||||
// baseFileUrl = "http://localhost:9000";
|
baseFileUrl = "http://localhost:9000";
|
||||||
// baseAiUrl = "http://localhost:11434";
|
baseAiUrl = "http://localhost:11434";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Enviroment.prod:
|
case Enviroment.prod:
|
||||||
|
|||||||
@@ -183,7 +183,15 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script> -->
|
</script> -->
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", function (e) {
|
||||||
|
document.addEventListener("focusin", function (event) {
|
||||||
|
if (event.target.tagName === "INPUT" || event.target.tagName === "TEXTAREA") {
|
||||||
|
event.target.setAttribute("spellcheck", "true");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<script defer="">
|
<script defer="">
|
||||||
var serviceWorkerVersion = '{{flutter_service_worker_version}}';
|
var serviceWorkerVersion = '{{flutter_service_worker_version}}';
|
||||||
var scriptLoaded = false;
|
var scriptLoaded = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user