omni_platform 0.3.0 copy "omni_platform: ^0.3.0" to clipboard
omni_platform: ^0.3.0 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
150
pub points
4%
popularity

Publisher

verified publishermanuelplavsic.ch

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