omni_platform 0.3.1 copy "omni_platform: ^0.3.1" to clipboard
omni_platform: ^0.3.1 copied to clipboard

discontinued

A package that integrates the declarative and pragmatic instruments provided by the packages virtual_platform and physical_platform.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:omni_platform/omni_platform.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  VirtualPlatform.notifier = VirtualPlatformNotifier(VirtualPlatforms.android);
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Virtual Platform Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(),
        body: Column(
          children: [
            VirtualPlatformDispatcher(
              linux: (_, __) => const Text("Linux"),
              android: (_, __) => const Text("android"),
              other: (_, __) => const Text("other"),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
160
points
37
downloads

Publisher

verified publishermanuelplavsic.ch

Weekly Downloads

A package that integrates the declarative and pragmatic instruments provided by the packages virtual_platform and physical_platform.

Repository (GitLab)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, physical_platform, virtual_platform

More

Packages that depend on omni_platform