dart_core_sdk (1.11.6)

Published 2025-11-04 19:49:57 +00:00 by git-bot

Installation

dart pub add dart_core_sdk:1.11.6 --hosted-url=

About this package

dart libs from core model proto files

Reflex Platform Dart SDK

This is the official Dart SDK for Reflex Platform. It provides client stubs for interacting with Reflex Platform APIs through gRPC.

Usage

Import the SDK and set up the gRPC client:

import 'package:dart_core_sdk/proj.pbgrpc.dart';
import 'package:grpc/grpc.dart';

class AuthInterceptor extends ClientInterceptor {
  final String token;

  AuthInterceptor(this.token);

  @override
  ResponseFuture<R> interceptUnary<Q, R>(
      ClientMethod<Q, R> method, Q request, CallOptions options, invoker) {
    final newOptions = options.mergedWith(CallOptions(metadata: {
      'Authorization': 'Bearer ',
    }));
    return invoker(method, request, newOptions);
  }
}

void main() async {
  final channel = ClientChannel(
    'grpc.core.reflex-platform.com',
    port: 443,
    options: const ChannelOptions(credentials: ChannelCredentials.secure()),
  );

  final client = ProjectServiceClient(
    channel,
    interceptors: [AuthInterceptor('YOUR_TOKEN')],
  );

  final request = GetMyUIContextRequest();
  final response = await client.getMyUIContext(request);

  print("Response: \");

  await channel.shutdown();
}

gRPC Endpoint

The SDK connects to the following gRPC endpoint:

grpc.core.reflex-platform.com

Example Flutter Application

A more complete Flutter application that demonstrates how to integrate the Reflex Platform Dart SDK is available. This serves as a reference implementation for using the SDK in a mobile application.

Repository: Flutter RP Example

Additional Resources

For more information on using the Reflex Platform SDK, please refer to the documentation.

License

This SDK is licensed under MIT License.

Details
Pub
2025-11-04 19:49:57 +00:00
2
989 KiB
Assets (1)
1.11.6.tar.gz 989 KiB
Versions (5) View all
1.11.8 2025-11-18
1.11.6 2025-11-04
1.11.3 2025-09-07
1.10.4 2025-04-22
1.10.1 2025-04-19