super(key: key);
@override
_PreTestFileState createState() => _PreTestFileState();
}
class _PreTestFileState extends State<PreTestFile> {
late dynamic? solar;
@override
void initState() {
TestDosyasi().dataKaydet();
//solar = context.watch<ChartRepoTest>().apiverigetir;
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Test"),
),
body: Consumer<TestDosyasi>(
builder: (_,foo,__)=> Center(
child: Column(
children: [
Text("${foo.data}"),
],
),
),
),
);
}
}
What are you even doing here.. you're directly creating an object of the TestDosyasi class and then using consumer to get it in the build method
Обсуждают сегодня