I want to display the Input given in the TextField to the place instead of the text shown as "result" in the below picture when the FloatingActionButton is pressed.

import 'package:flutter/material.dart';
void main(List<String> args) { runApp(MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData.dark(), home: const ScreenHomes(), ); } }class ScreenHomes extends StatefulWidget { const ScreenHomes({Key? key}) : super(key: key); @override State<ScreenHomes> createState() => _ScreenHomesState(); }
class _ScreenHomesState extends State<ScreenHomes> {
@override
Widget build(BuildContext context) {
final _textinfield = TextEditingController();
var newtext = "";
return Scaffold(
appBar: AppBar(backgroundColor: Colors.lightBlue),
body: SafeArea(
child: Center(
child: Column(children: [
Container(
child: Text(
newtext,
style: TextStyle(fontSize: 50),
)),
TextField(
controller: _textinfield,
decoration: InputDecoration(
border: OutlineInputBorder(), hintText: "Type to Print"),
)
]))),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.print),
onPressed: () {
setState(() {
newtext = _textinfield.text;
});
}),
);
}
}