2026-03-10-1

This commit is contained in:
Hamza-Ayed
2026-03-10 00:00:41 +03:00
parent 94ee193750
commit 0376a835ce
15 changed files with 764 additions and 562 deletions

View File

@@ -27,12 +27,12 @@ class _MyAppState extends State<MyApp> {
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
String platformVersion;
String platformVersion = 'Unknown platform version';
// Platform messages may fail, so we use a try/catch PlatformException.
// We also handle the message potentially returning null.
try {
platformVersion =
await _tripOverlayPlugin.getPlatformVersion() ?? 'Unknown platform version';
// TODO: Replace with the correct method from TripOverlayPlugin
platformVersion = 'Unknown platform version';
} on PlatformException {
platformVersion = 'Failed to get platform version.';
}
@@ -51,12 +51,8 @@ class _MyAppState extends State<MyApp> {
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on: $_platformVersion\n'),
),
appBar: AppBar(title: const Text('Plugin example app')),
body: Center(child: Text('Running on: $_platformVersion\n')),
),
);
}