[FEAT] inclusao do hallow button
parent
bda2d774a8
commit
ccb82eb992
@ -1,4 +1,4 @@
|
|||||||
# Siabes APP
|
# filled_button_components
|
||||||
|
|
||||||
Projeto flutter da plataforma
|
Projeto flutter da plataforma
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
# hollow_button_components
|
||||||
|
|
||||||
|
Projeto flutter da plataforma
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class HollowButtonComponent extends StatelessWidget {
|
||||||
|
const HollowButtonComponent({
|
||||||
|
Key? key,
|
||||||
|
required this.label,
|
||||||
|
required this.onPressed,
|
||||||
|
this.alignmentIcon,
|
||||||
|
this.icon,
|
||||||
|
required this.hexToColor,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String label;
|
||||||
|
final Function() onPressed;
|
||||||
|
final IconData? icon;
|
||||||
|
final AlignmentGeometry? alignmentIcon;
|
||||||
|
final Color hexToColor;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.9,
|
||||||
|
height: 70,
|
||||||
|
child: ElevatedButton(
|
||||||
|
style: ButtonStyle(
|
||||||
|
foregroundColor: MaterialStateProperty.all<Color>(hexToColor),
|
||||||
|
backgroundColor: MaterialStateProperty.all<Color>(Colors.white),
|
||||||
|
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
|
||||||
|
RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
side: BorderSide(color: hexToColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(label, textScaleFactor: 1.0, style: const TextStyle(fontSize: 15), textAlign: TextAlign.center),
|
||||||
|
Visibility(
|
||||||
|
visible: icon != null,
|
||||||
|
child: Container(
|
||||||
|
alignment: alignmentIcon,
|
||||||
|
child: Icon(icon),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onPressed: onPressed,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
name: hollow_button_components
|
||||||
|
description: Uma biblioteca Flutter personalizada
|
||||||
|
version: 1.0.0
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sdk: ">=2.16.2 <3.0.0"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- Kleber Cardoso
|
||||||
|
homepage: https://git.ae3tecnologia.com.br/Kleber-rr/components.git
|
||||||
|
dependencies:
|
||||||
|
flutter:
|
||||||
|
sdk: flutter
|
||||||
|
|
||||||
|
flutter:
|
||||||
|
uses-material-design: true
|
Loading…
Reference in New Issue