Skip to content

Instantly share code, notes, and snippets.

@rahichesoft
Created July 5, 2018 23:15
Show Gist options
  • Save rahichesoft/0c9143809d7ec0a079e45b9ee5e7fedf to your computer and use it in GitHub Desktop.
Save rahichesoft/0c9143809d7ec0a079e45b9ee5e7fedf to your computer and use it in GitHub Desktop.
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