const MyHome({Key? key}) : super(key: key);
@override
State<MyHome> createState() => _MyHomeState();
}
class _MyHomeState extends State<MyHome> {
@override
void initState() {
ProviderTest().dataDegistir("Burada veri yok şu anda");
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Naber"),
actions: [
Row(
children: [
IconButton(onPressed: (){
Navigator.push(context, MaterialPageRoute(builder: (context)=>SonrakiSayfa()));
}, icon: Icon(Icons.add))
],
),
],
),
body: Center(
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Sonraki sayfaya git"
),
],
),
),
),
);
}
}
You need to call Provider.of<ProviderTest>(context).dataDegister() like this
but data degistir void funct
Обсуждают сегодня