Created
November 4, 2021 02:39
-
-
Save vsomayaji/722c9b23a503511c1d333a9aa30cc82b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() { | |
WidgetsFlutterBinding.ensureInitialized(); | |
// Auto-enable accessibility for our Blind and Low Vision customers | |
RendererBinding.instance?.setSemanticsEnabled(true); | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return const MaterialApp( | |
home: MyStatefulWidget(), | |
); | |
} | |
} | |
class MyStatefulWidget extends StatefulWidget { | |
const MyStatefulWidget({Key? key}) : super(key: key); | |
@override | |
State<MyStatefulWidget> createState() => _MyStatefulWidgetState(); | |
} | |
class _MyStatefulWidgetState extends State<MyStatefulWidget> { | |
@override | |
Widget build(BuildContext context) { | |
return const Scaffold( | |
body: PinPut(), | |
); | |
} | |
} | |
class PinPut extends StatefulWidget { | |
const PinPut({Key? key}) : super(key: key); | |
@override | |
_PinPutState createState() => _PinPutState(); | |
} | |
class _PinPutState extends State<PinPut> { | |
@override | |
Widget build(BuildContext context) { | |
return Stack( | |
children: <Widget>[ | |
TextFormField( | |
// This seems to be the problem: when false, the input gets reversed | |
enableInteractiveSelection: false, | |
), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment