diff --git a/filled_button_component/README.md b/filled_button_component/README.md index 8360cc4..2589e7b 100644 --- a/filled_button_component/README.md +++ b/filled_button_component/README.md @@ -1,4 +1,4 @@ -# Siabes APP +# filled_button_components Projeto flutter da plataforma diff --git a/hollow_button_components/README.md b/hollow_button_components/README.md new file mode 100644 index 0000000..cd1fb29 --- /dev/null +++ b/hollow_button_components/README.md @@ -0,0 +1,4 @@ +# hollow_button_components + +Projeto flutter da plataforma + diff --git a/hollow_button_components/lib/hollow_button_components.dart b/hollow_button_components/lib/hollow_button_components.dart new file mode 100644 index 0000000..7c5221d --- /dev/null +++ b/hollow_button_components/lib/hollow_button_components.dart @@ -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(hexToColor), + backgroundColor: MaterialStateProperty.all(Colors.white), + shape: MaterialStateProperty.all( + 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, + ), + ); + } +} diff --git a/hollow_button_components/pubspec.yaml b/hollow_button_components/pubspec.yaml new file mode 100644 index 0000000..23986b9 --- /dev/null +++ b/hollow_button_components/pubspec.yaml @@ -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