43 lines
938 B
Dart
43 lines
938 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:ccc_cryptography/src/rust/api/simple.dart';
|
|
import 'package:ccc_cryptography/src/rust/frb_generated.dart';
|
|
|
|
Future<void> main() async {
|
|
await RustLib.init();
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatefulWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
State<MyApp> createState() => _MyAppState();
|
|
}
|
|
|
|
class _MyAppState extends State<MyApp> {
|
|
late String greetResult;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
greetResult = greet(name: 'Flutter');
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
const textStyle = TextStyle(fontSize: 25);
|
|
return MaterialApp(
|
|
home: Scaffold(
|
|
appBar: AppBar(title: const Text('ccc_cryptography')),
|
|
body: Center(
|
|
child: Text(
|
|
greetResult,
|
|
style: textStyle,
|
|
textAlign: TextAlign.center,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|