Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting with plain (non material ui) canvas in flutter

Tags:

flutter

All tutorials and documentation I've seen so far start of with importing flutter material. I am wondering is this an absolute requirement? What if I want to start with a plain canvas and build my own theme / widgets. Can I do this, if so what package should be used here so I get access to default widgets?

like image 684
Ilja Avatar asked Dec 26 '17 23:12

Ilja


People also ask

What is a canvas in flutter?

Like an artist’s canvas is a physical surface to draw on, a Canvas in Flutter is a virtual surface for drawing. But unlike a regular art canvas, you can’t paint on the Flutter canvas with physical brushes. Flutter Canvas uses a two-point (x and y) coordinate system to determine the position of a point on the screen.

What is the difference between Cupertino widget and material widget in flutter?

The Flutter Framework is divided into two parts Material widget (i.e. android based design guideline which is used in some views in android) and Cupertino widget (i.e. ios based design guideline). Thanks for contributing an answer to Stack Overflow!

What is flutter UI rendering stack?

Flutter’s UI rendering stack comprises the Dart and C++ layers. The Material and Cupertino widgets comply with the Google Material and iOS design languages at the Dart layer.

How do I understand Flutter’s layout system?

To fully understand Flutter’s layout system, you need to learn how Flutter positions and sizes the components in a layout. For more information, see Understanding constraints. The following videos, part of the Flutter in Focus series, explain Stateless and Stateful widgets.


1 Answers

Widgets in flutter makes the developers day easy. All the widgets are built on top dart:ui lib. It is up to you, to decide to use existing set of widgets or develop your ui from scratch. Flutter does not stop you from writing your own widgets.

You can find a few raw example of here, that does not use any widgets at all.

If you simple don't want only material widgets, then you can just build your own themed widgets with all other basic widgets and layouts available in flutter.

If you wanted to build few of your own widgets with a canvas and use it along with other widgets in flutter, you look into CustomPaint and CustomPainter widgets.

Hope this helped!

like image 114
Hemanth Raj Avatar answered Sep 29 '22 05:09

Hemanth Raj