0 purchases
curved container
Curved Container for Flutter #
Installing #
Add this to your package's /pubspec.yaml file:
dependencies:
curved_container: ^latest
copied to clipboard
Import #
import 'package:curved_container/curved_container.dart';
copied to clipboard
How to use #
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Curved Container',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const _CurvedContainerExample(),
);
}
}
class _CurvedContainerExample extends StatelessWidget {
const _CurvedContainerExample({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Curved Container Example'),
),
body: CurvedContainer(
defaultMargin: false,
containerHeight: 100,
curvedRadius: 2,
color: Colors.yellow,
),
);
}
}
copied to clipboard
Now, enjoy yourself:
CurvedContainer(
defaultMargin: false,
containerHeight: 100,
curvedRadius: 2,
color: Colors.yellow,
child: ...
);
copied to clipboard
Customize #
❗️Note:
backColor、curveRadius
License #
MIT License
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.