diff --git a/assets/icons/email.svg b/assets/icons/email.svg new file mode 100644 index 0000000..717582d --- /dev/null +++ b/assets/icons/email.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/components/newsletter.dart b/lib/components/newsletter.dart index 07ebed3..90a14fa 100644 --- a/lib/components/newsletter.dart +++ b/lib/components/newsletter.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:nekoya_flutter/utils/utils.dart'; const OutlineInputBorder outlineInputBorder = OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(12)), @@ -38,15 +40,47 @@ class Newsletter extends StatelessWidget { padding: const EdgeInsets.only(top: 25.0), child: TextFormField( decoration: InputDecoration( - filled: true, - fillColor: const Color(0xff212226), - hintText: "Input Your Email", - hintStyle: const TextStyle(color: Colors.white), - border: outlineInputBorder, - enabledBorder: outlineInputBorder, - focusedBorder: outlineInputBorder, - errorBorder: outlineInputBorder, - ), + filled: true, + fillColor: const Color(0xff212226), + hintText: "Input Your Email", + hintStyle: const TextStyle(color: Colors.white), + border: outlineInputBorder, + enabledBorder: outlineInputBorder, + focusedBorder: outlineInputBorder, + errorBorder: outlineInputBorder, + prefixIcon: Padding( + padding: const EdgeInsets.all(14), + child: SvgPicture.asset( + "assets/icons/email.svg", + color: Colors.white, + width: 21.5, + height: 21.5, + ), + ), + suffixIcon: Padding( + padding: const EdgeInsets.symmetric( + horizontal: defaultPadding, + vertical: defaultPadding / 2), + child: SizedBox( + width: 100, + height: 48, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + primary: const Color(0xff8B0000), + shape: const RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(12)), + )), + onPressed: () {}, + child: const Text( + 'SUBSCRIBE', + style: TextStyle( + fontSize: 12.0, + ), + ), + ), + ), + )), )), ], ),