flutter_powerauth_mobile_sdk_plugin 1.0.0-beta.5
flutter_powerauth_mobile_sdk_plugin: ^1.0.0-beta.5 copied to clipboard
Flutter Mobile SDK for PowerAuth Protocol (iOS, Android).
example/lib/main.dart
/*
* Copyright 2025 Wultra s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'src/test_screen.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Load in .env file
try {
await dotenv.load(fileName: ".env");
} catch (e) {
print("Error loading .env file: $e");
}
runApp(const PowerAuthTestingApp());
}
class PowerAuthTestingApp extends StatelessWidget {
const PowerAuthTestingApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'PowerAuth Testing App',
theme: ThemeData(
primarySwatch: Colors.blue,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
textStyle: const TextStyle(fontSize: 16),
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
textStyle: const TextStyle(fontSize: 16),
),
),
),
home: const PowerAuthTestingScreen(),
);
}
}