boxw 0.0.26 copy "boxw: ^0.0.26" to clipboard
boxw: ^0.0.26 copied to clipboard

unlisted

A collection of widget of me

example/lib/main.dart

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

void main(List<String> args) {
  runApp(MaterialApp(
    home: const Home(),
    theme: ThemeData(useMaterial3: false),
  ));
}

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

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('BoxE'),
      ),
      body: Expanded(
        child: SingleChildScrollView(
          child: Column(
            children: [
              BoxWRect(
                child: Column(
                  children: [
                    BoxWButton(
                      child: const Text('Show Dialog (horizontal buttons)'),
                      onPressed: () {
                        boxWDialog(
                          context: context,
                          title: 'Hello',
                          content: 'This is a boxw dialog',
                          buttons: (context) {
                            return [
                              Buttons(
                                axis: Axis.horizontal,
                                buttons: [
                                  BoxWButton(
                                    child: const Text('Button 1'),
                                    onPressed: () {},
                                  ),
                                  BoxWButton(
                                    child: const Text('Button 2'),
                                    onPressed: () {},
                                  ),
                                ],
                              ),
                            ];
                          },
                        );
                      },
                    ),
                    BoxWTextButton(
                      child: const Text('Show Dialog (vertical buttons)'),
                      onPressed: () {
                        boxWDialog(
                          context: context,
                          title: 'Hello',
                          content: 'This is a boxw dialog',
                          buttons: (context) {
                            return [
                              Buttons(
                                axis: Axis.vertical,
                                buttons: [
                                  BoxWButton(
                                    child: const Text('Button 1'),
                                    onPressed: () {},
                                  ),
                                  BoxWButton(
                                    child: const Text('Button 2'),
                                    onPressed: () {},
                                  ),
                                ],
                              ),
                            ];
                          },
                        );
                      },
                    ),
                    BoxWOutlinedButton(
                      child: const Text(
                          'Show Dialog (vertical -> horizontal buttons)'),
                      onPressed: () {
                        boxWDialog(
                          context: context,
                          title: 'Hello',
                          content: 'This is a boxw dialog',
                          buttons: (context) {
                            return [
                              Buttons(
                                axis: Axis.vertical,
                                buttons: [
                                  BoxWButton(
                                    child: const Text('Button 1'),
                                    onPressed: () {},
                                  ),
                                  BoxWButton(
                                    child: const Text('Button 2'),
                                    onPressed: () {},
                                  ),
                                ],
                              ),
                              Buttons(
                                axis: Axis.horizontal,
                                buttons: [
                                  BoxWButton(
                                    child: const Text('Button 1'),
                                    onPressed: () {},
                                  ),
                                  BoxWButton(
                                    child: const Text('Button 2'),
                                    onPressed: () {},
                                  ),
                                ],
                              ),
                            ];
                          },
                        );
                      },
                    ),
                    BoxWNeumorphismButton(
                      child: const BoxWNeumorphism(
                        child: Text(
                            'Show Dialog (vertical -> horizontal buttons)'),
                      ),
                      onPressed: () {
                        boxWDialog(
                          context: context,
                          title: 'Hello',
                          content: 'This is a boxw dialog',
                          buttons: (context) {
                            return [
                              Buttons(
                                axis: Axis.horizontal,
                                buttons: [
                                  BoxWButton(
                                    child: const Text('Button 1'),
                                    onPressed: () {},
                                  ),
                                  BoxWButton(
                                    child: const Text('Button 2'),
                                    onPressed: () {},
                                  ),
                                ],
                              ),
                              Buttons(
                                axis: Axis.vertical,
                                buttons: [
                                  BoxWButton(
                                    child: const Text('Button 1'),
                                    onPressed: () {},
                                  ),
                                  BoxWButton(
                                    child: const Text('Button 2'),
                                    onPressed: () {},
                                  ),
                                ],
                              ),
                            ];
                          },
                        );
                      },
                    ),
                  ],
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
0
pub points
44%
popularity

Publisher

unverified uploader

A collection of widget of me

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on boxw