You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sambo Chea db4b9af0cd
Update toJson on base model
3 months ago
bin Add models and sdk services example 3 months ago
lib Update toJson on base model 3 months ago
test Add models and sdk services example 3 months ago
.gitignore Task: Add sample client sdk 1 year ago
CHANGELOG.md Task: Add sample client sdk 1 year ago
README.md Add example code 3 months ago
analysis_options.yaml Task: Add sample client sdk 1 year ago
pubspec.lock Add models and sdk services example 3 months ago
pubspec.yaml Add models and sdk services example 3 months ago

README.md

Sample Dart SDK

  • Test Example Code
import 'package:sample_sdk/sdk.dart';
import 'package:sample_sdk/sdk/models/category.dart';
import 'package:sample_sdk/sdk/models/product.dart';

void main() async {
  final sdk = ClientSDK();

  final category = Category(
    id: 4,
    name: 'Category 4',
    parent: Category(
      id: 1,
      name: 'Category 1',
    ),
  );

  await sdk.categoryService.create(category);
  final categories = await sdk.categoryService.findAll();
  print(categories);

  final product = Product(
    id: 4,
    name: 'Product 4',
    price: 100.0,
    category: category,
  );

  await sdk.productService.create(product);
  final products = await sdk.productService.findAll();
  print(products);

  sdk.dispose();
}

Contributors