Anonymous
Flutter IOS - Как скрыть кнопку «Готово» в верхней части клавиатуры iOS?
Сообщение
Anonymous » 04 май 2025, 10:46
Кнопка «Готово» не работает в Flutter Web (Safari, Chrome). < /p>
Я только что добавил виджет Textformfield в «Counter Example Project 'и построил его на Chrome. < /p>
И я получаю доступ к одному и тому же локально Возникнуть.
Код: Выделить всё
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextFormField(
autofocus: false,
enableSuggestions: false,
toolbarOptions: null,
keyboardType: TextInputType.visiblePassword),
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}
}
Подробнее здесь:
https://stackoverflow.com/questions/718 ... s-keyboard
1746344771
Anonymous
Кнопка «Готово» не работает в Flutter Web (Safari, Chrome). < /p> Я только что добавил виджет Textformfield в «Counter Example Project 'и построил его на Chrome. < /p> И я получаю доступ к одному и тому же локально Возникнуть.[code] void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({Key? key, required this.title}) : super(key: key); final String title; @override State createState() => _MyHomePageState(); } class _MyHomePageState extends State { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ TextFormField( autofocus: false, enableSuggestions: false, toolbarOptions: null, keyboardType: TextInputType.visiblePassword), const Text( 'You have pushed the button this many times:', ), Text( '$_counter', style: Theme.of(context).textTheme.headline4, ), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: const Icon(Icons.add), ), ); } } [/code] Подробнее здесь: [url]https://stackoverflow.com/questions/71822489/flutter-ios-how-to-hide-the-done-button-at-the-top-of-the-ios-keyboard[/url]