0
votes

In my app, I do have a main widget(parent widget), which has a drawer, an appbar and also a bottom navigation bar. Inside that widget I have different pages(child widget), that are going to be displayed when I press on a specific Item in the bottom navigation bar. And I have made a function through that I can select multiple elements of the child widget. When the selection is active it should change the appbar of the parent widget.

The child and parent widget are in different files.

I hope somebody of you could help me with my problem. That would be awesome.

1

1 Answers

1
votes

let's say your child widget is inside MyChild.dart file and you want to use it in your main.dart file , so all you need is to import that file like this

import 'package:yourappname/MyChild.dart';