diff --git a/lib/widgets/circle_widget.dart b/lib/widgets/circle_widget.dart new file mode 100644 index 0000000..45cb499 --- /dev/null +++ b/lib/widgets/circle_widget.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; +import 'package:ocbo_esign_validator/widgets/text_widget.dart'; + +class CircleWidget extends StatelessWidget { + final IconData? icon; + final String text; + final VoidCallback onPressed; + + const CircleWidget({super.key, required this.icon, required this.text, required this.onPressed}); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onPressed, + child: Container( + padding: EdgeInsets.all(16), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + color: Colors.white10, + border: Border.all(color: const Color.fromARGB(77, 255, 255, 255)), + ), + width: 120, + height: 120, + child: Column( + children: [ + const Gap(8), + Icon(icon, color: Colors.white, size: 32), + const Gap(8), + TextWidget(text: text, size: 16), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/image_widget.dart b/lib/widgets/image_widget.dart index 5d7db95..89e59ef 100644 --- a/lib/widgets/image_widget.dart +++ b/lib/widgets/image_widget.dart @@ -5,20 +5,30 @@ class ImageWidget extends StatelessWidget { final double size; final bool measureByHeight; final bool? network; - const ImageWidget( - {super.key, required this.imagePath, required this.size, required this.measureByHeight, this.network}); + const ImageWidget({ + super.key, + required this.imagePath, + required this.size, + required this.measureByHeight, + this.network, + }); @override Widget build(BuildContext context) { return (network == true) ? (measureByHeight) - ? Image.network(imagePath, - height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round()) - : Image.network(imagePath, - width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round()) + ? Image.network( + imagePath, + height: size, + cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round(), + ) + : Image.network( + imagePath, + width: size, + cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round(), + ) : (measureByHeight) - ? Image.asset(imagePath, - height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round()) - : Image.asset(imagePath, width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round()); + ? Image.asset(imagePath, height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round()) + : Image.asset(imagePath, width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round()); } } diff --git a/lib/widgets/text_widget.dart b/lib/widgets/text_widget.dart index 58e2f5a..bb3bce9 100644 --- a/lib/widgets/text_widget.dart +++ b/lib/widgets/text_widget.dart @@ -25,6 +25,6 @@ class TextWidget extends StatelessWidget { return title == true ? Text(text, style: GoogleFonts.outfit(textStyle: textStyle)) - : Text(text, style: GoogleFonts.inter(textStyle: textStyle)); + : Text(text, style: GoogleFonts.roboto(textStyle: textStyle)); } }