Reputation: 3016
I am fairly new with flutter and am trying to create a application that doesn't follow the material design guidelines(company wants their own designs).
I can only seem to create stuff using material design or cupertino. I am not sure how to use custom scaffolds or in the widget build function return new MaterialApp(...
, or the AppBar
if that can be flat instead of having a shadow.
I hope this is making sense. I am just trying to find a way around.
Upvotes: 18
Views: 17394
Reputation: 276997
There is no problem with not using Cupertino/Material design. In fact flutter is made with custom brand design in mind. It just happens to ship a Material design as bonus.
Flutter provides tons of design agnostics widgets that you can use to make your custom look. A few examples are:
You can also make some very advanced rendering using the lower layer CustomPaint
or RenderBox
You can have a list of what's available here: https://docs.flutter.dev/flutter/widgets/widgets-library.html
Upvotes: 27
Reputation: 3622
Flutter has some catch phrases like "Everything is a widget!". So everything that you and everything that you write above MaterialApp, CupertinoApp etc. are widgets. Another catchphrase is "You don't have to say no to your designer anymore" and these are mostly telling that you are free.
As entry point you have a main method calling a method called runApp
void main() => runApp(SomeWidget());
So, if you open the documentation of runApp, you can see the statement
Inflate the given widget and attach it to the screen.The widget is given constraints during layout that force it to fill the entire screen. ....
And method declaration shows that it is expecting a widget as can be seen here void runApp(Widget app)
.
Actually these shows, even your application is a widget and you can even run apps within apps.
Anyway, long story short, those classes and everything that you see there is out of the box helper things that you can use (and mostly easy to be modified) to have something looking native and something nice that maybe your designer is telling you to use.
But with Flutter you are not bound to those classes only, you can implement everything in a way that you want (or your designer wants) and simply use it, because, at the end of the day, everything is a widget :)
Upvotes: 5