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

PlatformiOS
outdated

A flutter plugin for Apple's os_signpost API.

example/lib/main.dart

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

import 'package:signposts/signposts.dart' as signposts;

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

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

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    signposts.emitEvent('hello');
  }

  @override
  Widget build(BuildContext context) {
    const textStyle = TextStyle(fontSize: 25);
    const spacerSmall = SizedBox(height: 10);
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Native Packages'),
        ),
        body: SingleChildScrollView(
          child: Container(
            padding: const EdgeInsets.all(10),
            child: Column(
              children: const [
                Text(
                  'This calls a native function through FFI that is shipped as source in the package. '
                  'The native code is built as part of the Flutter Runner build.',
                  style: textStyle,
                  textAlign: TextAlign.center,
                ),
                spacerSmall,
                Text(
                  'hello world',
                  style: textStyle,
                  textAlign: TextAlign.center,
                ),
                spacerSmall,
              ],
            ),
          ),
        ),
      ),
    );
  }
}
0
likes
120
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin for Apple's os_signpost API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

ffi, flutter, plugin_platform_interface

More

Packages that depend on signposts

Packages that implement signposts