Easy and Fast coding using Fluttex
Fluttex is a package that developed for flutter framework. flutter developers can use this package to reduce their coding time and make coding easier. Fluttex include limited feature and it maybe enhanced features within time.
Features
Easy Navigation
Instead of :
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => Home()));
Use this :
go(context, Home());
Also you can enter your route name :
go(context, 'home');
Instead of :
Navigator.of(context).pop();
Use this :
goBack(context);
All Navigation modes :
// push
go(context, Home());
go(context, 'home');
// push replacement
goReplace(context, Home());
goReplace(context, 'home');
// push and remove until
goRemove(context, Home());
goRemove(context, 'home');
// pop
goBack(context);
Modal bottm sheet
Show modal bottom sheet easily :
onPressed: () {
modalBottomSheet(context: context);
}
For example :
modalBottomSheet(
context: context,
topBorderRadius: 25,
height: 300,
child: Column(
children: [
// Your Widgets
],
));
Solving keyboard problem :
This problem is happend when developer using text field in the modal bottom sheet. in normal mode keyboard puted on the modal bottom sheet and for solving that you should do some works. Fluttex solve this problem and you dont need to do additionally work.
This issue was tested. but it may be different in another flutter versions or phones. so you can test this part easily and if the problem is there yet, you can contact me.
Snack bar
Show snack bar :
onPressed: () {
snackBar(context: context, onActionPressed: () {});
}
For example :
snackBar(
context: context,
onActionPressed: () {},
isFixed: false,
text: 'Fluttex',
backgroundColor: Colors.black,
borderRadius: BorderRadius.circular(10),
actionText: 'close',
secondsDuration: 2,
width: 200);
Material banner
Show material banner :
onPressed: () {
materialBanner(context: context);
},
For example :
materialBanner(
context: context,
onVisible: () {},
customAction: () {},
text: 'Fluttex',
actionText: 'Close',
backgroundColor: Colors.black,
textStyle: TextStyle(color: Colors.white),
);
Installation and using Fluttex
Add Fluttex to pubspec.yaml
Fluttex: ^1.0.0
Import this code in your project
import 'package:fluttex/fluttex.dart';
Developing information
- Developer : Amirz64
- Email : [email protected]
- Telegram : @AmirzCode
Made with love in Iran