wx_box 2.0.2 copy "wx_box: ^2.0.2" to clipboard
wx_box: ^2.0.2 copied to clipboard

Const widget that provides a box-like layout with customizable elevation.

example/lib/main.dart

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'WxBox Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const ColoredBox(
              color: Colors.amber,
              child: WxBox(
                width: 50,
                height: 50,
              ),
            ),
            const WxBox(height: 20),
            WxBox.circle(
              color: Theme.of(context).colorScheme.surface,
              radius: 25,
              elevation: 2,
            ),
            const WxBox(height: 20),
            WxAnimatedBox(
              color: Colors.amber,
              width: 150,
              height: 50,
              borderWidth: 1,
              borderStyle: BorderStyle.solid,
              borderColor: Theme.of(context).colorScheme.onSurface,
              borderAlign: BorderSide.strokeAlignOutside,
              shape: WxBoxShape.stadium,
              alignment: Alignment.center,
              child: Text(
                'Text',
                style: Theme.of(context).textTheme.titleLarge,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
0
pub points
6%
popularity

Publisher

verified publisherwidgetarian.com

Const widget that provides a box-like layout with customizable elevation.

Repository (GitHub)
View/report issues

Topics

#ui #box #container #animated #widgetarian

Funding

Consider supporting this project:

buymeacoffee.com
ko-fi.com

License

unknown (license)

Dependencies

flutter

More

Packages that depend on wx_box