Home > Back-end >  WHAT IS THİS Dart:ui I could never figure out
WHAT IS THİS Dart:ui I could never figure out

Time:01-04

import 'dart:ui' as ui; 

I can't figure out what the dart ui is doing?

Can someone explain by example where we use it and what happens if we don't use it?

CodePudding user response:

Dart.ui has the built-in types and core primitives for a Flutter application. Things like the definition of Color, Images, the Canvas, etc. Not importing it means that flutter won't know that Color is a type, as an example. You can read more about it here: https://api.flutter.dev/flutter/dart-ui/dart-ui-library.html

CodePudding user response:

To use, import dart:ui.

This library exposes the lowest-level services that Flutter frameworks use to bootstrap applications, such as classes for driving the input, graphics text, layout, and rendering subsystems.

  •  Tags:  
  • Related