stager_platform_native_plugins_linux 0.0.1 copy "stager_platform_native_plugins_linux: ^0.0.1" to clipboard
stager_platform_native_plugins_linux: ^0.0.1 copied to clipboard

PlatformLinux

Linux implementation of the stager_platform_native_plugins plugin

stager_platform_native_plugins_linux #

The linux implementation of stager_platform_native_plugins.

Usage #

This package is endorsed, which means you can simply use stager_platform_native_plugins normally. This package will be automatically included in your app when you do.

Testing #

This package uses a combination of Dart unit tests, integration tests, and native C++ unit tests.

Dart Unit Tests #

Dart unit tests verify the platform implementation using a mock method channel. To run them, run:

flutter test

Integration Tests #

Integration tests run on the actual Linux platform and call the real native code. To run them, navigate to the main example directory (located at ../stager_platform_native_plugins/example) and run:

cd ../stager_platform_native_plugins/example
flutter test integration_test/native_test.dart -d linux

Native Unit Tests (C++) #

Native unit tests verify the C++ logic in isolation using GoogleTest. These tests are built as part of the Flutter build process.

To run them:

  1. Build the main example app in debug mode:

    cd ../stager_platform_native_plugins/example
    flutter build linux --debug
    
  2. Navigate to the plugin's build directory relative to the main example build root:

    cd build/linux/x64/debug/plugins/stager_platform_native_plugins_linux
    
  3. Run the tests using ctest or by executing the test binary directly:

    ctest
    

    or by executing an individual test file:

    ./stager_linux_xml_validator_test