{"id":7367,"date":"2020-04-17T09:47:07","date_gmt":"2020-04-17T09:47:07","guid":{"rendered":"https:\/\/www.getwidget.dev\/blogs\/flutter-image-widget\/"},"modified":"2024-12-12T13:14:36","modified_gmt":"2024-12-12T13:14:36","slug":"flutter-image-widget","status":"publish","type":"post","link":"https:\/\/www.getwidget.dev\/blog\/flutter-image-widget\/","title":{"rendered":"How To Customise Flutter Image Widget with example Code"},"content":{"rendered":"<p><a href=\"https:\/\/docs.getwidget.dev\/gf-image\/\" target=\"_blank\" rel=\"noopener\">Flutter Image<\/a> is generally a simple component that represents a thing or a group of things pictorially or which simply boosts the message or the text with a pictorial example to make the user understand better through the images that are displayed along with the paragraphs or the blog of data.<\/p>\n<h3 id=\"how-to-use-image-in-flutter-with-gfimage\">How to use Image in Flutter with GFimage<\/h3>\n<p><a href=\"https:\/\/docs.getwidget.dev\/gf-image\/\" target=\"_blank\" rel=\"noopener\"><strong>GFImages<\/strong><\/a> is a Flutter Images that also represents the data with its specific pictorial representation in a very different and more convenient way. It uses the assets folder to take the static images and to display them on the app or it even takes network images through the network image property and it also takes a special property called Image Overlay ie, Image Overlay set its picture as the background and any form of paragraph or text in its foreground and thus an overlay of any kind of colors can be applied to it which gives a blurry effect on the picture.<\/p>\n<h3 id=\"how-to-get-started\">How to Get Started<\/h3>\n<p>Now here is the guide about how we should start developing Flutter Image Widget while using <strong>GetWidget<\/strong> UI Library.<\/p>\n<p><a href=\"https:\/\/docs.getwidget.dev\/getting-started\/\" target=\"_blank\" rel=\"noopener\"><strong>Getting started<\/strong><\/a> will guide you on how to start building a beautiful flutter application with the <strong>GetWidget<\/strong> UI library. You have to install the package from <strong>pub.dev<\/strong>, import the package in your Flutter project.<\/p>\n<blockquote><p><em>Install Package from pub.dev :<\/em><\/p><\/blockquote>\n<p><a href=\"https:\/\/pub.dev\/packages\/getwidget\/\" target=\"_blank\" rel=\"noopener\"><strong>https:\/\/pub.dev\/packages\/getwidget<\/strong><\/a><\/p>\n<h3 id=\"import-full-package\">Import full package:<\/h3>\n<p>import &#8216;package:getwidget\/getwidget.dart&#8217;;<\/p>\n<p><strong>Note: dependencies: getwidget: ^4.0.0<\/strong><\/p>\n<blockquote><p><em>Keep playing with the pre-built UI components.<\/em><\/p><\/blockquote>\n<p><strong>GetWidget Images<\/strong> is basically used to display the profile pictures of the users and to make it easy it has other types that can be used. In the below section we will see them with the example codes.<\/p>\n<h3 id=\"flutter-image-using-assetimage-or-network-image\">Flutter Image using assetImage or Network Image<\/h3>\n<p>The <strong>Flutter basic Image<\/strong> is a simple image with a specific height and width property. It is widely used to show a banner image or to represent a product image etc.<\/p>\n<p>The below shows how the image can be used with Example Code.<\/p>\n<figure class=\"kg-card kg-code-card\">\n<pre><code class=\"language-javascript\">import 'package:getwidget\/getwidget.dart';\n\nGFImageOverlay(\n  height: 200,\n  width: 300,\n  image: AssetImage('your asset image')\n)<\/code><\/pre><figcaption><span style=\"white-space: pre-wrap;\">Flutter image used with Asset or network image example code<\/span><\/figcaption><\/figure>\n<h3 id=\"flutter-circular-image-using-assetimage-or-network-image\">Flutter Circular Image using assetImage or network Image<\/h3>\n<p>A <a href=\"https:\/\/www.getwidget.dev\/blog\/flutter-avatar-widget-component\/\"><strong>Flutter Circular Image<\/strong><\/a> is a rounded image that is mostly used as a profile picture or to show the profile of any kind of product, organization, or brand image to the users.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" class=\"kg-image lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/getwidget\/\/2023\/04\/Images-circular_3x_DOdazHv_R.webp\" alt=\"\" width=\"800\" height=\"800\" \/><noscript><img decoding=\"async\" class=\"kg-image lazyload\" src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/getwidget\/\/2023\/04\/Images-circular_3x_DOdazHv_R.webp\" alt=\"\" width=\"800\" height=\"800\" \/><\/noscript><\/figure>\n<p>The below shows how the image can be used in the code structure.<\/p>\n<figure class=\"kg-card kg-code-card\">\n<pre><code class=\"language-javascript\">import 'package:getwidget\/getwidget.dart';\n \n GFImageOverlay(\n   height: 200,\n   width: 200,\n   shape: BoxShape.circle,\n   image:AssetImage('your asset image')\n )\n<\/code><\/pre><figcaption><span style=\"white-space: pre-wrap;\">Flutter Circular image with asset or network example\u00a0<\/span><\/figcaption><\/figure>\n<figure class=\"kg-card kg-bookmark-card\">\n<div class=\"kg-bookmark-content\">\n<div class=\"kg-bookmark-title\">How to Design Flutter Circle Avatar Image With example Code<\/div>\n<div class=\"kg-bookmark-description\">A flutter avatar widget used to display the user\u2019s profile image in different shapes.<\/div>\n<div class=\"kg-bookmark-metadata\"><img decoding=\"async\" class=\"kg-bookmark-icon lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"__GHOST_URL__\/favicon.png\" alt=\"\" \/><noscript><img decoding=\"async\" class=\"kg-bookmark-icon lazyload\" src=\"__GHOST_URL__\/favicon.png\" alt=\"\" \/><\/noscript><span class=\"kg-bookmark-author\">GetWidget- A Flutter open-source UI Library!<\/span><span class=\"kg-bookmark-publisher\">ujjwal bhardwaj<\/span><\/div>\n<\/div>\n<div class=\"kg-bookmark-thumbnail\"><img decoding=\"async\" class=\"lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/getwidget\/2023\/05\/Avatars.png\" alt=\"\" \/><noscript><img decoding=\"async\" class=\"lazyload\" src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/getwidget\/2023\/05\/Avatars.png\" alt=\"\" \/><\/noscript><\/div>\n<\/figure>\n<h3 id=\"flutter-image-overlay-with-colorfilter\">Flutter Image Overlay with colorFilter<\/h3>\n<p>An <strong>Image Overlay<\/strong> is used to set the images in the background and the text in the foreground and to give a blurry effect with the colorfilter property.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" class=\"kg-image lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/getwidget\/\/2023\/04\/Images_-_basic_3x_uHCFyLq7s.webp\" alt=\"\" width=\"800\" height=\"533\" \/><noscript><img decoding=\"async\" class=\"kg-image lazyload\" src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/getwidget\/\/2023\/04\/Images_-_basic_3x_uHCFyLq7s.webp\" alt=\"\" width=\"800\" height=\"533\" \/><\/noscript><\/figure>\n<p>The below code shows how a blurry effect can be achieved to the images.<\/p>\n<figure class=\"kg-card kg-code-card\">\n<pre><code class=\"language-javascript\">import 'package:getwidget\/getwidget.dart';\n \n GFImageOverlay(\n   height: 200,\n   width: 300,\n   child: Center(\n      child: Text('Light Overlay', style:TextStyle(color:getGFColor(GFColor.white))\n  ),\n   colorFilter: new ColorFilter.mode(\n   Colors.black.withOpacity(0.20),\n   BlendMode.darken),\n   image: AssetImage('your asset image')\n )<\/code><\/pre><figcaption><span style=\"white-space: pre-wrap;\">Flutter Overlay image with Example code snippet<\/span><\/figcaption><\/figure>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title ez-toc-toggle\" style=\"cursor:pointer\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ffffff;color:#ffffff\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ffffff;color:#ffffff\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.getwidget.dev\/blog\/flutter-image-widget\/#gf-flutter-image-custom-properties\" >GF Flutter Image Custom Properties<\/a><\/li><\/ul><\/nav><\/div>\n<h2 id=\"gf-flutter-image-custom-properties\"><span class=\"ez-toc-section\" id=\"gf-flutter-image-custom-properties\"><\/span>GF Flutter Image Custom Properties<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The custom properties of <strong>GFImage<\/strong> are given below to customize the look and feel of the image.<\/p>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>height<\/strong><\/td>\n<td>defines the height of the image<\/td>\n<\/tr>\n<tr>\n<td><strong>width<\/strong><\/td>\n<td>defines the width of the image<\/td>\n<\/tr>\n<tr>\n<td><strong>color<\/strong><\/td>\n<td>defines the background color of the image<\/td>\n<\/tr>\n<tr>\n<td><strong>margin<\/strong><\/td>\n<td>image&#8217;s outer container margin<\/td>\n<\/tr>\n<tr>\n<td><strong>padding<\/strong><\/td>\n<td>image&#8217;s outer container padding<\/td>\n<\/tr>\n<tr>\n<td><strong>alignment<\/strong><\/td>\n<td>to align the child within the image<\/td>\n<\/tr>\n<tr>\n<td><strong>boxFit<\/strong><\/td>\n<td>how to image should be inscribed into the box<\/td>\n<\/tr>\n<tr>\n<td><strong>borderRadius<\/strong><\/td>\n<td>the corners of the image<\/td>\n<\/tr>\n<tr>\n<td><strong>border<\/strong><\/td>\n<td>the border above the image<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"can-we-use-network-image-in-image-overlay\">Can we use network image in image overlay?<\/h3>\n<p>Yes, we can use any kind of image whether an asset image or a network image.<\/p>\n<h3 id=\"can-we-use-the-circular-image-as-an-avatar-image\">Can we use the circular image as an avatar image?<\/h3>\n<p>Yes, we can use the circular image as an avatar image by adjusting the height and width of the image.<\/p>\n<p><a href=\"https:\/\/docs.getwidget.dev\/\" target=\"_blank\" rel=\"noopener\"><strong>Flutter Get Widget Docs<\/strong><\/a><\/p>\n<figure class=\"kg-card kg-bookmark-card\">\n<div class=\"kg-bookmark-content\">\n<div class=\"kg-bookmark-title\">Flutter GetWidget Docs<\/div>\n<div class=\"kg-bookmark-description\">Get Widget is one of the largest Flutter open-source UI Kit libraries for mobile or web apps. It has more than 1000+ pre-built reusable widgets.<\/div>\n<div class=\"kg-bookmark-metadata\"><\/div>\n<\/div>\n<div class=\"kg-bookmark-thumbnail\"><img decoding=\"async\" class=\"lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/docs\/tr:dpr-auto,tr:w-auto\/link-share_aT-cHzGY9.png\" alt=\"\" \/><noscript><img decoding=\"async\" class=\"lazyload\" src=\"https:\/\/ik.imagekit.io\/ionicfirebaseapp\/docs\/tr:dpr-auto,tr:w-auto\/link-share_aT-cHzGY9.png\" alt=\"\" \/><\/noscript><\/div>\n<\/figure>\n<p><a href=\"https:\/\/github.com\/ionicfirebaseapp\/getwidget\/\" target=\"_blank\" rel=\"noopener\"><strong>GitHub Repository<\/strong><\/a>:<\/p>\n<p>Please do appreciate our work through Github start<\/p>\n<h3 id=\"conclusion\">Conclusion:<\/h3>\n<p>Here we discuss, what <a href=\"https:\/\/docs.getwidget.dev\/gf-image\/\" target=\"_blank\" rel=\"noopener\"><strong>Flutter Image Widget<\/strong><\/a> is? And how we can use and implement it into our Flutter app through the <strong>GetWidget<\/strong> <strong>Image<\/strong> component. Here, there are options to customize the <strong>Image<\/strong> Widget.<\/p>\n<h3 id=\"about-our-team\">About Our Team:<\/h3>\n<p>We have been working on Flutter since Flutter launched in beta version in 2017. And our team have been putting hundreds and hundreds of hour to experiment and implementation of Flutter. As well as after successful delivery of enterprise and SAAS applications that have been used by more than 500+ businesses around the 119+ countries. Now we are in love with Flutter development and we are very passionate about Flutter development. Now it is something we are trying to give a small contribution to the <a href=\"https:\/\/forum.getwidget.dev\/\" target=\"_blank\" rel=\"noopener\">Flutter Dev Community<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"You can customize Network images or assets with Circular, Overlay image custom properties with step-by-step example code.","protected":false},"author":1,"featured_media":5204,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","footnotes":""},"categories":[139],"tags":[],"class_list":{"0":"post-7367","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-flutter","8":"cs-entry"},"_links":{"self":[{"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/posts\/7367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/comments?post=7367"}],"version-history":[{"count":3,"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/posts\/7367\/revisions"}],"predecessor-version":[{"id":8790,"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/posts\/7367\/revisions\/8790"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/media\/5204"}],"wp:attachment":[{"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/media?parent=7367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/categories?post=7367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.getwidget.dev\/blog\/wp-json\/wp\/v2\/tags?post=7367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}