flutter_open_xr 0.1.1+1 copy "flutter_open_xr: ^0.1.1+1" to clipboard
flutter_open_xr: ^0.1.1+1 copied to clipboard

CLI package to build Flutter projects into a Windows OpenXR runtime host.

example/lib/main.dart

import "package:flutter/material.dart";

void main() {
  runApp(const CounterApp());
}

class CounterApp extends StatelessWidget {
  const CounterApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "OpenXR Counter Sample",
      theme: ThemeData(colorSchemeSeed: Colors.teal),
      home: const CounterPage(),
    );
  }
}

class CounterPage extends StatefulWidget {
  const CounterPage({super.key});

  @override
  State<CounterPage> createState() => _CounterPageState();
}

class _CounterPageState extends State<CounterPage> {
  int _count = 0;

  void _increment() {
    setState(() {
      _count += 1;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("OpenXR Counter Sample")),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            const Text("Button pressed:"),
            Text(
              "$_count",
              style: Theme.of(context).textTheme.displaySmall,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _increment,
        child: const Icon(Icons.add),
      ),
    );
  }
}
0
likes
0
points
98
downloads

Publisher

unverified uploader

Weekly Downloads

CLI package to build Flutter projects into a Windows OpenXR runtime host.

License

unknown (license)

Dependencies

args, path

More

Packages that depend on flutter_open_xr