baasatrakuza_flutter 1.0.0 copy "baasatrakuza_flutter: ^1.0.0" to clipboard
baasatrakuza_flutter: ^1.0.0 copied to clipboard

outdated

BaaS@rakuza SDK for Flutter

example/lib/main.dart

import 'package:baasatrakuza_flutter/baasatrakuza_flutter.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String? _appName;

  @override
  void initState() {
    super.initState();
    _initState();
  }

  Future<void> _initState() async {
    await RKZClient.instance.init('tenantKey');

    final appSettings = await RKZClient.instance.appSettings();

    setState(() {
      _appName = appSettings.name;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('appName: ${_appName ?? ''}'),
        ),
      ),
    );
  }
}