reference 0.2.0-beta.1 copy "reference: ^0.2.0-beta.1" to clipboard
reference: ^0.2.0-beta.1 copied to clipboard

outdated

Reduce plugin maintenance burden for plugins that have to maintain platform object instances in memory.

example/lib/main.dart

import 'package:flutter/material.dart';

// ignore: implementation_imports
import 'package:reference/src/template/template.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {
  String _text = 'nada';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(child: Text(_text)),
        floatingActionButton: FloatingActionButton(
          onPressed: () async {
            final ClassTemplate classTemplate = ClassTemplate(44);
            final String result = await classTemplate.methodTemplate('Hello,');
            setState(() {
              _text = result;
            });
          },
          child: const Icon(Icons.ac_unit),
        ),
      ),
    );
  }
}
2
likes
0
pub points
46%
popularity

Publisher

unverified uploader

Reduce plugin maintenance burden for plugins that have to maintain platform object instances in memory.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on reference