How can I use dart:ui in a command line Dart application?

Viewed 155

I know that dart:ui contains "Built-in types and core primitives for a Flutter application". I'd like to use Color and other functionality from this package (computeLuminance) in a command-line (Dart) application that converts some data files.

(I would also like to use estimateBrightnessForColor from Flutter Material, but I guess this is even harder, or impossible.)

I'm using the Dart SDK that is bundled with the Flutter SDK.

import 'dart:io';
import 'dart:ui';

I get Error: Not found: 'dart:ui'

As a side note, I can import and use dart:ui on DartPad.

0 Answers
Related