easy_container 0.0.2
easy_container: ^0.0.2 copied to clipboard
An easy to use container for flutter with built in gesture detectors and a lot of customization.
EasyContainer For Flutter #
An easy to use container for flutter with built in gesture detectors and a lot of customization.
Screenshots #
Usage #
To use this plugin, add easy_container
as a dependency in your pubspec.yaml file.
dependencies:
flutter:
sdk: flutter
easy_container:
First and foremost, import the widget.
import 'package:easy_container/easy_container.dart';
You can now add an EasyContainer
widget to your widget tree and pass the child as the only required parameter to get started.
This widget will create a route between the source and the destination LatLng's provided.
EasyContainer(
child: Text("Hello World"),
),
If an onTap parameter is provided, it can be used as a button.
EasyContainer(
child: Text("Hello World"),
onTap: () => print("Hello World"),
),
Sample Usage
import 'package:easy_container/easy_container.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: SafeArea(
child: Scaffold(
body: Center(
child: EasyContainer(
height: 150,
child: Center(
child: Text(
"Hello World ...",
style: TextStyle(fontSize: 25),
),
),
padding: const EdgeInsets.all(20),
elevation: 10,
onTap: () => print("Container Tapped"),
margin: const EdgeInsets.all(20),
borderRadius: 20,
backgroundColor: Colors.orange,
),
),
),
),
);
}
}
See the example
directory for a complete sample app.
Created & Maintained By Rithik Bhandari
#
- GitHub: @rithik-dev
- LinkedIn: @rithik-bhandari