fc_components 0.5.8 copy "fc_components: ^0.5.8" to clipboard
fc_components: ^0.5.8 copied to clipboard

My common custom component collection.

example/lib/main.dart

import 'package:example/cell.dart';
import 'package:example/sort_button.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'FC Components Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'FC Components Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView(
        children: [
          Card(
            child: ListTile(
              title: const Text('FcCell'),
              onTap: () {
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return const Cell();
                }));
              },
            ),
          ),
          Card(
            child: ListTile(
              title: const Text('FcButton(未完工)'),
              onTap: () {
                // Navigator.push(context, MaterialPageRoute(builder: (context) {
                //   return const Button();
                // }));
              },
            ),
          ),
          Card(
            child: ListTile(
              title: const Text('FcEmpty(未完工)'),
              onTap: () {
                // Navigator.push(context, MaterialPageRoute(builder: (context) {
                //   return const Cell();
                // }));
              },
            ),
          ),
          Card(
            child: ListTile(
              title: const Text('FcSortButton'),
              onTap: () {
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return const SortButton();
                }));
              },
            ),
          ),
          Card(
            child: ListTile(
              title: const Text('FcNavigationBar'),
              onTap: () {
                Navigator.push(context, MaterialPageRoute(builder: (context) {
                  return NavigationBar(destinations: const [],);
                }));
              },
            ),
          ),
        ],
      ),
    );
  }
}
1
likes
115
pub points
0%
popularity

Publisher

unverified uploader

My common custom component collection.

Homepage

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on fc_components