pure_dart_ui 0.1.7 copy "pure_dart_ui: ^0.1.7" to clipboard
pure_dart_ui: ^0.1.7 copied to clipboard

The classes from `dart.ui` that run on pure Dart with no dependency on the Flutter SDK.

Pure Dart UI #

Cover - Pure Dart UI

GitHub License Pub Package Code Size Publisher

Build Status Pull Requests Issues Pub Score

Classes from dart.ui that run on pure Dart. Eliminates the error "Dart library 'dart:ui' is not available on this platform". Feel free to use it in your awesome project or to quickly run a 3rd-party package with Flutter dependencies on the server side or CLI.

Android iOS Linux MacOS Web Windows
platform
Dart Flutter
SDK

Share some ❤️ and star repo to support the project.

Motivation #

Sometimes we want to use nice packages from pub.dev on the CLI or server side. But (sometimes) the needed package has dependencies on Flutter...

I created pure_dart_ui to address this injustice in a single line (see Usage section below).

Features #

Classes independed of the Flutter SDK #

  • Color
  • Offset
  • Rect
  • Size

Functions independed of the Flutter SDK #

  • clampDouble
  • lerpDouble

Usage #

Add the package pure_dart_ui to pubspec.yaml and import the library:

import 'package:pure_dart_ui/pure_dart_ui.dart';

Or, if you want to fix the error stream when you run dart main.dart, then replace the line

// replace this import and be happy
import 'dart:ui';

with the line above in the desired 3rd-party package.

Use the classes and functions in this package same way you used Flutter dart:ui.

In other words, you can create your own application or use a 3rd-party package with dart:ui features based on a pure Dart, without depending on the Flutter SDK.

Use Color #

const color = Color(0xffa1b2c3);

Welcome to Inspiration #

Requests and suggestions are warmly welcome.

Contributions are what make the open-source community such a great place to learn, create, and be inspired.

If this is your first contribution, I'll leave you with some of the best links I've found: they will help you get started or/and become even more efficient.

The package PureDartUi is open-source, stable and well-tested. Development happens on GitHub. Feel free to report issues or create a pull-request there.

General questions are best asked on StackOverflow.

And here is a curated list of how you can help:

  • Report parts of the documentation that are unclear.
  • Fix typos/grammar mistakes.
  • Update the documentation or add examples.
  • Report bugs and scenarios that are difficult to implement.
  • Implement new features by making a pull-request (look below).

Copied with ❤️

5
likes
0
pub points
79%
popularity

Publisher

verified publishersyrokomskyi.com

The classes from `dart.ui` that run on pure Dart with no dependency on the Flutter SDK.

Repository (GitHub)
View/report issues

Topics

#pure-dart #ui #geometry #color #rectangle

License

unknown (license)

More

Packages that depend on pure_dart_ui