alex_core 0.0.5 alex_core: ^0.0.5 copied to clipboard
Pagake for Alexcao, Core plugin for develop Flutter project fast, Include Widgets what is used regularly, user bloc and other service
A core plugin for develop Flutter project fast Include Widgets what is used regularly
Features #
Contains the custom Widgets
Getting started #
The project just needs to be added and used without any constraints
Usage #
Let's try:
class MyButton extends StatelessWidget {
const MyButton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const InkWellButton(
width: 100,
height: 40,
backgroundColor: Colors.transparent,
radius: 20,
borderWidth: 1.5,
primaryColor: Colors.blueAccent,
child: Text(
label,
style: TextStyle(
'Đăng nhập',
fontWeight: FontWeight.w500,
color: Colors.white,
)
)
,
);
}
}
It is equivalent to:
class InkWellButton extends StatelessWidget {
const InkWellButton({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.circular(radius),
child: Material(
color: Colors.transparent,
child: InkWell(
splashColor: Colors.primaryColor,
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(radius)),
border: Border.all(color: Colors.primaryColor, width: 1.5),
),
height: 40.0,
width: 100.0,
child: Center(
child: Text(
'Đăng nhập',
style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.white,
)
)
),
),
onTap: () {
onTap();
}
),
),
);
}
}
and we have a Button look like:
on tap:
Additional information #
The package is under development and will be continuously updated