Double display of Japanese TextField input

Widgets & Design

When I enter text in Japanese, the characters are duplicated as shown in the attached image.

Please tell me how to prevent this from happening.

What have you tried so far?

I created custom widgets and changed widget settings as shown below.

■code

// Automatic FlutterFlow imports import '/backend/backend.dart'; import '/actions/actions.dart' as action_blocks; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/custom_code/widgets/index.dart'; // Imports other custom widgets import '/custom_code/actions/index.dart'; // Imports custom actions import '/flutter_flow/custom_functions.dart'; // Imports custom functions import 'package:flutter/material.dart'; // Begin custom widget code // DO NOT REMOVE OR MODIFY THE CODE ABOVE! class JapaneseInputText extends StatefulWidget { const JapaneseInputText({ Key? key, this.width, this.height, this.text, }) : super(key: key); final double? width; final double? height; final String? text; @override _JapaneseInputTextState createState() => _JapaneseInputTextState(); } class _JapaneseInputTextState extends State<JapaneseInputText> { late TextEditingController _controller; final FocusNode _focusNode = FocusNode(); @override void initState() { super.initState(); _controller = TextEditingController(text: widget.text); } @override void dispose() { _controller.dispose(); _focusNode.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Padding( padding: EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 15.0), child: TextFormField( controller: _controller, focusNode: _focusNode, autofocus: false, obscureText: false, keyboardType: TextInputType.multiline, // 変更点: 複数行の入力を許可 textInputAction: TextInputAction.newline, // 変更点: Enterキーで改行 maxLines: null, decoration: InputDecoration( labelStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: 'Noto Sans', color: Color(0xFFA9A9A9), letterSpacing: 0.0, lineHeight: 1.0, ), hintText: 'あなたが気づいたことは.....', hintStyle: FlutterFlowTheme.of(context).labelMedium.override( fontFamily: 'Noto Sans', letterSpacing: 0.0, ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( color: FlutterFlowTheme.of(context).customColorMain, width: 2.0, ), borderRadius: BorderRadius.circular(8.0), ), focusedBorder: OutlineInputBorder( borderSide: BorderSide( color: FlutterFlowTheme.of(context).primary, width: 2.0, ), borderRadius: BorderRadius.circular(8.0), ), errorBorder: OutlineInputBorder( borderSide: BorderSide( color: FlutterFlowTheme.of(context).error, width: 2.0, ), borderRadius: BorderRadius.circular(8.0), ), focusedErrorBorder: OutlineInputBorder( borderSide: BorderSide( color: FlutterFlowTheme.of(context).error, width: 2.0, ), borderRadius: BorderRadius.circular(8.0), ), ), style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Noto Sans', letterSpacing: 0.0, lineHeight: 1.5, ), textAlign: TextAlign.start, minLines: 4, ), ); } }

Did you check FlutterFlow's Documentation for this topic?
No
3
1 reply