Reputation:
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.
Upvotes: 0
Views: 493
Reputation: 31356
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';
Upvotes: 1