lb_iam 1.0.0
lb_iam: ^1.0.0 copied to clipboard
Logbot IAM service is responsible to manage: * Users * Groups * Organizations and subgroups * Roles and permissions
example/lib/main.dart
// Copyright 2022 Logbot SRL. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:example/ui/apis/service_api.dart';
import 'package:example/ui/apis/users_api.dart';
import 'package:example/ui/home_page.dart';
import 'package:example/ui/login_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:lb_auth/src/logbot_env.dart';
import 'ui/apis/groups_api.dart';
Future<void> main() async {
await dotenv.load(fileName: ".env");
LogbotEnvironment.set(Environment.stage);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Logbot SDK - IAM Example',
themeMode: ThemeMode.dark,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const LoginPage(),
initialRoute: '/login',
routes: {
'/home': (context) => const HomePage(),
'/login': (context) => const LoginPage(),
'/iam/groups': (context) => const GroupsApiPage(),
'/iam/users': (context) => const UsersApiPage(),
'/iam/service': (context) => const ServiceApiPage(),
},
);
}
}