fastyle_buttons 0.0.15 copy "fastyle_buttons: ^0.0.15" to clipboard
fastyle_buttons: ^0.0.15 copied to clipboard

Set of buttons Widgets for the fastyle library.

example/lib/main.dart

// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:fastyle_buttons/fastyle_buttons.dart';
import 'package:fastyle_core/fastyle_core.dart';
import 'package:go_router/go_router.dart';

final kAppInfo = kFastAppInfo.copyWith(
  appName: 'Fastyle Buttons',
  databaseVersion: 0,
);

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  bool _isPending = false;

  @override
  Widget build(BuildContext context) {
    return FastApp(
      appInformation: kAppInfo,
      routesForMediaType: (mediaType) => [
        GoRoute(path: '/', builder: (context, __) => buildHome(context)),
      ],
    );
  }

  Widget buildHome(BuildContext context) {
    return FastSectionPage(
      titleText: 'Buttons',
      showAppBar: false,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          const FastCopyButton(valueText: '42'),
          FastPendingOutlineButton(
            text: 'Outline button',
            onTap: () {
              setState(() => _isPending = !_isPending);
            },
            isPending: _isPending,
          ),
          FastPendingRaisedButton(
            text: 'Raised button',
            onTap: () {
              setState(() => _isPending = !_isPending);
            },
            isPending: _isPending,
          ),
        ],
      ),
    );
  }
}
1
likes
0
pub points
3%
popularity

Publisher

unverified uploader

Set of buttons Widgets for the fastyle library.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

easy_localization, fastyle_core, flutter, font_awesome_flutter, go_router, lingua_core

More

Packages that depend on fastyle_buttons