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

Create the shape you want, decorate it the way you want and put it where you wantn

example/lib/main.dart

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

void main(List<String> args) {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Simple shapes')),
        body: const MyHomeBody(),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      child: FittedBox(
        child: Stack(
          children: [
            Column(
              children: [
                const Icon(
                  Icons.add,
                  size: 162,
                ).paddingInsets.all(16),
                const Icon(
                  Icons.add,
                  size: 262,
                ).paddingInsets.all(16),
              ],
            ),
            Row(
              children: [
                const Icon(
                  Icons.edit,
                  size: 162,
                ).paddingInsets.all(16),
                const Icon(
                  Icons.edit,
                  size: 262,
                ).paddingInsets.all(16)
              ],
            )
          ],
        )
            .foreground(
              color: Colors.amber.withOpacity(.5),
              // shouldExpand: true,
              clipBehavior: Clip.antiAlias,
              // alignment: Alignment.topCenter,
              // fit: BoxFit.fitHeight,
            )
            .buildRRect(
              // height: 300,
              width: 160,
            ),
      ),
    );
  }
}
0
likes
160
pub points
29%
popularity

Publisher

unverified uploader

Create the shape you want, decorate it the way you want and put it where you wantn

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on shape_builder