Crates.io | dioxus-sdk |
lib.rs | dioxus-sdk |
version | 0.5.1 |
source | src |
created_at | 2024-04-04 03:10:48.672258 |
updated_at | 2024-10-27 23:41:52.06112 |
description | Platform agnostic library for supercharging your productivity with Dioxus |
homepage | https://dioxuslabs.com |
repository | https://github.com/DioxusLabs/dioxus-sdk/ |
max_upload_size | |
id | 1195802 |
size | 80,641 |
A platform agnostic library for supercharging your productivity with Dioxus.
This library is still under development. Expect breaking changes!
dioxus-sdk
is a development kit for Dioxus that provides abstractions for your Dioxus app. Abstractions included are notifications, clipboard, geolocation and storage with more to come!
Features
Geolocation example:
use dioxus_sdk::geolocation::{
init_geolocator, use_geolocation, PowerMode
};
fn app() -> Element {
let geolocator = init_geolocator(PowerMode::High).unwrap();
let coords = use_geolocation();
match coords {
Ok(coords) => {
rsx!( p { "Latitude: {coords.latitude} | Longitude: {coords.longitude}" } )
}
Err(Error::NotInitialized) => {
rsx!( p { "Initializing..." } )
}
Err(e) => {
rsx!( p { "An error occurred {e}" } )
}
}
}
On linux you need the x11 library to use the clipboard abstraction:
sudo apt-get install xorg-dev
You can add dioxus-sdk
to your application by adding it to your dependencies.
[dependencies]
dioxus-sdk= { version = "0.5", features = [] }
This project is licensed under the MIT license.
Every contribution intentionally submitted for inclusion in dioxus-sdk
by you, shall be licensed as MIT, without any additional terms or conditions.