Created
July 5, 2018 23:15
-
-
Save rahichesoft/0c9143809d7ec0a079e45b9ee5e7fedf to your computer and use it in GitHub Desktop.
This file contains 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
class ClassOne extends StatefulWidget { | |
var person= 'myname'; | |
hey(){ | |
print('hey hello'); | |
} | |
@override | |
ClassOneState createState() => ClassOneState(); | |
} | |
class ClassOneState extends State<ClassOne> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(), | |
body: ListView( | |
children: <Widget>[ | |
], | |
), | |
); | |
} | |
} | |
class ClassTwo extends StatefulWidget { | |
@override | |
_ClassTwoState createState() => new _ClassTwoState(); | |
} | |
class _ClassTwoState extends State<ClassTwo> { | |
var instone= ClassOne(); | |
_ClassTwoState(){ | |
instone.person="test"; | |
} | |
@override | |
void initState() { | |
instone.person="test"; | |
super.initState(); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(), | |
body: ListView( | |
children: <Widget>[ | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment