blob: 2291ff2176a108d431013551d9a6128a6afe4628 [file] [log] [blame]
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. 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:flutter/material.dart';
import 'package:objective_c/objective_c.dart';
void main() {
runApp(const MaterialApp(home: MainApp()));
}
class MainApp extends StatefulWidget {
const MainApp({super.key});
@override
State<MainApp> createState() => _MainAppState();
}
class _MainAppState extends State<MainApp> {
late final String message;
@override
void initState() {
super.initState();
message = NSString('Hello World!').toDartString();
}
@override
Widget build(BuildContext context) {
return Scaffold(body: Center(child: Text(message)));
}
}