tau_war 0.17.15 copy "tau_war: ^0.17.15" to clipboard
tau_war: ^0.17.15 copied to clipboard

PlatformAndroidiOS
unlisted

An Etau implemention for Android and iOS, using the tau_webkit plugin. Member of the `Tau` family. Europe Stands With Ukraine. Pray for Ukraine.

example/lib/main.dart

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

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

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  late int sumResult;
  late Future<int> sumAsyncResult;

  @override
  void initState() {
    super.initState();
    //sumResult = tau_war.sum(1, 2);
    //sumAsyncResult = tau_war.sumAsync(3, 4);
  }

  @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(
                  'sum(1, 2) = $sumResult',
                  style: textStyle,
                  textAlign: TextAlign.center,
                ),
                spacerSmall,
                FutureBuilder<int>(
                  future: sumAsyncResult,
                  builder: (BuildContext context, AsyncSnapshot<int> value) {
                    final displayValue =
                        (value.hasData) ? value.data : 'loading';
                    return Text(
                      'await sumAsync(3, 4) = $displayValue',
                      style: textStyle,
                      textAlign: TextAlign.center,
                    );
                  },
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
copied to clipboard
0
likes
140
points
100
downloads

Publisher

verified publishertau.canardoux.xyz

Weekly Downloads

2024.09.22 - 2025.04.06

An Etau implemention for Android and iOS, using the tau_webkit plugin. Member of the `Tau` family. Europe Stands With Ukraine. Pray for Ukraine.

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, plugin_platform_interface, tau_webkit

More

Packages that depend on tau_war