| // Copyright (c) 2024, 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!').toString(); |
| } |
| |
| @override |
| Widget build(BuildContext context) { |
| return Scaffold(body: Center(child: Text(message))); |
| } |
| } |