123456789101112131415161718192021 |
- import 'package:flutter/material.dart';
- import 'decoration.dart';
- class BoxWidget extends StatelessWidget {
- final Widget body;
- final bool paddingAll;
- BoxWidget({required this.body, this.paddingAll = true});
- @override
- Widget build(BuildContext context) {
- return Container(
- margin: const EdgeInsets.fromLTRB(12.0, 6.0, 12.0, 6.0),
- padding: paddingAll
- ? const EdgeInsets.all(12.0)
- : const EdgeInsets.symmetric(horizontal: 12.0),
- decoration: circular(),
- child: body);
- }
- }
|