Flutter - Call method of main file
up vote
0
down vote
favorite
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.
android ios dart flutter
add a comment |
up vote
0
down vote
favorite
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.
android ios dart flutter
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
android ios dart flutter
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.
android ios dart flutter
android ios dart flutter
asked Nov 7 at 15:31
Stnieder
6012
6012
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
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';
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
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';
add a comment |
up vote
1
down vote
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';
add a comment |
up vote
1
down vote
up vote
1
down vote
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';
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';
answered Nov 7 at 16:08
Raouf Rahiche
3,1112925
3,1112925
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53192620%2fflutter-call-method-of-main-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown