schmucklicloud_storage 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 73

schmuckliCloud Storage SDK for Dart #

This is the official SDK for the schmuckliCloud Storage service for Dart.

Get started #

To install the package, just add the following line in your existing pubspec.yaml file under dependencies:

dependencies:
    schmucklicloud_storage: <SELECT THE NEWEST VERSION>

After that, just install the package on your local machine via the command:

pub get

Now you are ready to use the schmuckliCloud storage service on your Dart/Flutter projects.

Use in your project #

Before you can use the function inside of your project, you also have to import the package in your file, where you will using the service.

//Import the package
import 'package:schmucklicloud_storage/main.dart';

//Setup a referene
sCStorage reference = new sCStorage("<YOUR_APP_ID>", "<YOUR_APP_SECRET>");

//Define the bucket id and the dataset id
reference.setBucket(12);
reference.setDataset("my_dataset");

//Instead of a dataset, you also can use the auth token, when you want to use user specific data
reference.setAuthToken("<AUTH_TOKEN>");

As you can see in the example above, you have to create a reference to use then the function to insert, update, delete and get the data from the backend.

0.1.4 #

  • Fixed bugs

1.0.0 #

  • First productive version

0.1.4 #

  • Small improvements

0.1.3 #

  • Small improvements

0.1.2 #

  • Added get function to filter data

0.1.1 #

  • Updated README

0.1.0 #

  • Initial version

example/example.dart

//Import the package
import 'package:schmucklicloud_storage/main.dart';

//Setup a referene
sCStorage reference = new sCStorage("<YOUR_APP_ID>", "<YOUR_APP_SECRET>");

//Define the bucket id and the dataset id
reference.setBucket(12);
reference.setDataset("my_dataset");

//Instead of a dataset, you also can use the auth token, when you want to use user specific data
reference.setAuthToken("<AUTH_TOKEN>");

//Insert some data
Map<String, dynamic> data = {
    "column_a": "some data...",
    "column_b": 34,
    "another_column": true
};
reference.insert("fancy_container", data).then((response) {
    print(jsonDecode(response.body)["status"]);
    //If the status code is 200, then the data has been saved successfully
    //If another status code is shown, then check the message parameter from the decoded response.body.
});

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  schmucklicloud_storage: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:schmucklicloud_storage/config.dart';
import 'package:schmucklicloud_storage/main.dart';
import 'package:schmucklicloud_storage/sCNotify.dart';
import 'package:schmucklicloud_storage/sCStorage.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
87
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/sCStorage.dart. (-12.66 points)

Analysis of lib/sCStorage.dart reported 27 hints, including:

line 37 col 13: Unnecessary new keyword.

line 41 col 13: Unnecessary new keyword.

line 45 col 13: Unnecessary new keyword.

line 48 col 18: Unnecessary new keyword.

line 77 col 13: Unnecessary new keyword.

Format lib/config.dart.

Run dartfmt to format lib/config.dart.

Format lib/main.dart.

Run dartfmt to format lib/main.dart.

Format lib/sCNotify.dart.

Run dartfmt to format lib/sCNotify.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http ^0.12.0 0.12.0+4
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6