flutter_example 0.0.2 copy "flutter_example: ^0.0.2" to clipboard
flutter_example: ^0.0.2 copied to clipboard

This is a plugin example.

example/lib/main.dart

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

Future<void> main() async {
  runApp(
    ExampleHomePage(
      appName: 'Example',
      pages: [
        TestPage.createPage(),
      ],
    ),
  );
}

class TestPage extends StatelessWidget {
  static ExamplePage createPage() {
    return ExamplePage(Icons.text_fields, (context) => const TestPage());
  }

  const TestPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: const <Widget>[
          Text('TestPage'),
        ],
      ),
    );
  }
}

/**
 * 发布流程:
 * 1、flutter pub login
 * 2、flutter pub publish --dry-run
 * 3、flutter pub publish --server=https://pub.dartlang.org
 */
0
likes
70
pub points
35%
popularity

Publisher

unverified uploader

This is a plugin example.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter, url_launcher

More

Packages that depend on flutter_example