Juthi Sarker Aka
Juthi Sarker Aka

Reputation: 2465

Should I always use MaterialApp as the parent widget of my app?

I am new in flutter. I am developing an app using it. Is it must that I should always use MaterialApp as the parent widget of my app? I was mistakenly wrapping each page of my app by MaterialApp.

Upvotes: 3

Views: 1506

Answers (2)

mirkancal
mirkancal

Reputation: 5345

Some material and cupertino widgets require you to use MaterialApp or CupertinoApp as an ancestor but there is no problem with not using Cupertino/Material design, you can make your own design.

Example:

This widget also configures the observer of the top-level Navigator (if any) to perform Hero animations.

MaterialApp class

Upvotes: 1

Yahia
Yahia

Reputation: 31

That’s the most commonly used, but you can use others like “Cupertino” which is an ios like style.

Upvotes: 2

Related Questions