soft_container 1.0.4
soft_container: ^1.0.4 copied to clipboard
A Flutter package for design a container easily
example/main.dart
import 'package:flutter/material.dart';
import 'package:soft_container/soft_container.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'SoftContainer Example',
home: Scaffold(
backgroundColor: Colors.grey.shade100,
appBar: AppBar(
title: const Text('SoftContainer Demo'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SoftContainer(
width: 250,
height: 100,
borderRadius: 20,
containerColor: Colors.white,
boxShadowColor: Colors.black26,
child: const Center(
child: Text(
'Default Soft Container',
style: TextStyle(fontSize: 18),
),
),
),
SoftContainer(
width: 250,
height: 100,
isBoxShadow: false,
borderRadius: 30,
containerColor: Colors.blue.shade50,
margin: const EdgeInsets.all(10),
child: const Center(
child: Text(
'No Shadow',
style: TextStyle(fontSize: 18),
),
),
),
],
),
),
),
);
}
}