I am using provider package to detect changes in 'todaysTasks' but as you can see 'todayTasks' depends on DaysRecords which stores a list of DayTasks, so what I want is to rebuild my root widget (which is MyApp) whenever i push a DayTask in DaysRecords.recordsList but can't figure out any way to do that. Is there any solution to this??
class MyApp extends StatelessWidget {
static const routeName = '/root';
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
DayTasks todaysTasks = DaysRecords.recordsList.last;
return ChangeNotifierProvider(
create: (context) => todaysTasks,