Help with my code Please..I want to pass 10 digit numbers between screens

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: HomePage(),
    ); // MaterialApp
  }
}



class HomePage extends StatefulWidget {
  final String value;
  const HomePage({Key key, this.value}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState(value: this.value);
}

class _HomePageState extends State<HomePage> {
  String value;
  _HomePageState({this.value});
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: new AppBar(
        title: new Text("Calculator"),
      ), //AppBar
      backgroundColor: Colors.white38,
      body: Column(
        children: <Widget>[
          Expanded(
            child: Container(
              child: Column(
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  children: <Widget>[
                Container(
                  padding: EdgeInsets.all(10),
                  alignment: Alignment.centerLeft,
                  child: Text(
                    value,                    
                    style: TextStyle(fontSize: 20, color: Colors.white, fontWeight: FontWeight.bold),
                  ),
                ),

This is my Firstpage.

class EnterNum extends StatefulWidget {
  @override
  _EnterNumState createState() => _EnterNumState();
}

class _EnterNumState extends State<EnterNum> {
  String value;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Welcome"),
      ),
      body: Padding(
        padding: EdgeInsets.all(30.0),
        child: Column(
          children: [
            TextField(
              decoration: const InputDecoration(hintText: "Type a Ph.Number", border: OutlineInputBorder()),
              keyboardType: TextInputType.text,
              onChanged: (text) {
                value = text;
              },
              obscureText: false,
              maxLength: 10,
            ),
            RaisedButton(
                onPressed: () {
                  Navigator.pop(
                    context,
                    value,
                  );
                },
                child: Text('Ok!', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
                padding: EdgeInsets.symmetric(
                  vertical: 11.0,
                ))
          ],
        ),
      ),
    );
  }
}

This is my SecondPage

i want to pass a 10 digit number from secondpage to firstpage…
i almost did everything…But it still doesn’t work…
i don’t know whats wrong with my code…
can you plz help me?
i commented some unwanted code there in firstpage…
iam using value as variable to store the nums…
i am struggling with this for about a week…
can you please say me what mistake i have done??

// Try to understand this, Hope it will resolve your problem
//1st screen code

import ‘package:flutter/material.dart’;
import ‘package:just_test/second_screen.dart’;

void main() => runApp(MaterialApp(
home: HomePage(),
));

class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}

class _HomePageState extends State {
String value = “Initial text”;

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Center(
child: Text(
‘First page’,
),
),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(value),
ElevatedButton(
onPressed: () async {
final result = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SecondPage(),
));
setState(() {
value = result;
print(“line40 $value”);
});
},
child: Text(“Go to 2nd screen”))
],
)));
}
}

//2nd screen code

import ‘package:flutter/material.dart’;

class SecondPage extends StatefulWidget {
@override
_SecondPageState createState() => _SecondPageState();
}

class _SecondPageState extends State {
String value = ‘This is from 2nd page’;

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(“Second screen”),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
TextField(
decoration: const InputDecoration(
hintText: “Type a Ph.Number”, border: OutlineInputBorder()),
keyboardType: TextInputType.text,
onChanged: (text) {
value = text;
},
obscureText: false,
maxLength: 10,
),
ElevatedButton(
onPressed: () {
Navigator.pop(context, value);
},
child: Text(‘Go back to 1st screen’))
],
),
),
);
}
}