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

The classes and functions from dart:ui that works on all platforms: Color, Offset, Rect, Size, etc.

Pure Dart UI #

SDK version Supported platforms Supported SDKs

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". You can now quickly run a third-party package with Flutter dependencies on the server side or CLI. Feel free to use it in your awesome project.

CodeFactor

Share some ❤️ and star repo to support the Pure Dart UI.

If you write an article about PureDartUi or any of these packages, let me know and I'll post the URL of the article in the README 🤝

🔥 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);

🔗 Similar Projects #

✨ What's New #

Look at changelog.

👋 Welcome #

If you encounter any problems, feel free to open an issue. If you feel the package is missing a feature, please raise a ticket on Github and I'll look into it. Requests and suggestions are warmly welcome. Danke!

Contributions are what make the open-source community such a great place to learn, create, take a new skills, 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:

  • Documenting the undocumented. Whenever you come across a class, property, or method within our codebase that you're familiar with and notice it lacks documentation, kindly spare a couple of minutes to jot down some helpful notes for your fellow developers.
  • Refining the code. While I'm aware it's primarily my responsibility to refactor the code, I wholeheartedly welcome any contributions you're willing to make in this area. Your insights and improvements are appreciated!
  • Constructive code reviews. Should you discover a more efficient approach to achieve something, I'm all ears. Your suggestions for enhancement are invaluable.
  • Sharing your examples. If you've experimented with our use cases or have crafted some examples of your own, feel free to add them to the example directory. Your practical insights can enrich our resource pool.
  • Fix typos/grammar mistakes.
  • Report bugs and scenarios that are difficult to implement.
  • Implement new features by making a pull-request.

✅ TODO (perhaps) #

Once you start using the PureDartUi, it will become easy to choose the functionality to contribute. But if you already get everything you need from this package but have some free time, let me write here what I have planned:

  • Documenting the undocumented. Whenever you come across a class, property, or method within our codebase that you're familiar with and notice it lacks documentation, kindly spare a couple of minutes to jot down some helpful notes for your fellow developers.
  • Refining the code. While I'm aware it's primarily my responsibility to refactor the code, I wholeheartedly welcome any contributions you're willing to make in this area. Your insights and improvements are appreciated!
  • Constructive code reviews. Should you discover a more efficient approach to achieve something, I'm all ears. Your suggestions for enhancement are invaluable.
  • Sharing your examples. If you've experimented with our use cases or have crafted some examples of your own, feel free to add them to the example directory. Your practical insights can enrich our resource pool.
  • Fix typos/grammar mistakes.
  • Report bugs and scenarios that are difficult to implement.
  • Implement new features by making a pull-request.

It's just a habit of mine: writing down ideas that come to mind while working on a project. I confess that I rarely return to these notes. But now, hopefully, even if you don't have an idea yet, the above notes will help you choose the suitable "feature" and become a contributor to the open-source community.

Ready for 🪙

Created with ❤️

fresher

6
likes
160
points
712
downloads

Publisher

verified publishersyrokomskyi.com

Weekly Downloads

The classes and functions from dart:ui that works on all platforms: Color, Offset, Rect, Size, etc.

Repository (GitHub)
View/report issues
Contributing

Topics

#pure-dart #user-interface #geometry #color #rectangle

Documentation

API reference

License

MIT (license)

More

Packages that depend on pure_dart_ui