Search
 
SCRIPT & CODE EXAMPLE
 

DART

how to blur image in flutter

Using Stack:

SizedBox(
  height: 200,
  child: Stack(
    fit: StackFit.expand,
    children: [
      Image.asset('chocolate_image', fit: BoxFit.cover),
      ClipRRect( // Clip it cleanly. 
        child: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
          child: Container(
            color: Colors.grey.withOpacity(0.1),
            alignment: Alignment.center,
            child: Text('CHOCOLATE'),
          ),
        ),
      ),
    ],
  ),
)
Without using Stack:

Container(
  height: 200,
  width: double.maxFinite,
  decoration: BoxDecoration(
    image: DecorationImage(
      image: ExactAssetImage("your_chocolage_image"),
      fit: BoxFit.cover,
    ),
  ),
  child: ClipRRect( // make sure we apply clip it properly
    child: BackdropFilter(
      filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
      child: Container(
        alignment: Alignment.center,
        color: Colors.grey.withOpacity(0.1),
        child: Text(
          "CHOCOLATE",
          style: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
        ),
      ),
    ),
  ),
)
Comment

flutter blur background

                      BackdropFilter(
                          filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
                          child: child )
Comment

add blur filter in flutter


ClipRect(
              child: BackdropFilter(
                filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
                child: Container(
                  height: Get.height,
                  width: Get.width,
                  decoration: BoxDecoration(
                    color: Colors.white.withOpacity(0.7),
                    borderRadius:const BorderRadius.only(
                      topRight: Radius.circular(35),
                      topLeft: Radius.circular(35),
                    )

                  ),
                  child: child,
                ),
              ),
            )
Comment

how to blur Container in flutter

Container(
    color: Colors.black.withOpacity(0.8),
  ),
Comment

how to blur image in flutter

Using Stack:

SizedBox(
  height: 200,
  child: Stack(
    fit: StackFit.expand,
    children: [
      Image.asset('chocolate_image', fit: BoxFit.cover),
      ClipRRect( // Clip it cleanly. 
        child: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
          child: Container(
            color: Colors.grey.withOpacity(0.1),
            alignment: Alignment.center,
            child: Text('CHOCOLATE'),
          ),
        ),
      ),
    ],
  ),
)
Without using Stack:

Container(
  height: 200,
  width: double.maxFinite,
  decoration: BoxDecoration(
    image: DecorationImage(
      image: ExactAssetImage("your_chocolage_image"),
      fit: BoxFit.cover,
    ),
  ),
  child: ClipRRect( // make sure we apply clip it properly
    child: BackdropFilter(
      filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
      child: Container(
        alignment: Alignment.center,
        color: Colors.grey.withOpacity(0.1),
        child: Text(
          "CHOCOLATE",
          style: TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
        ),
      ),
    ),
  ),
)
Comment

flutter blur background

                      BackdropFilter(
                          filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
                          child: child )
Comment

add blur filter in flutter


ClipRect(
              child: BackdropFilter(
                filter: ImageFilter.blur(sigmaX: 50, sigmaY: 50),
                child: Container(
                  height: Get.height,
                  width: Get.width,
                  decoration: BoxDecoration(
                    color: Colors.white.withOpacity(0.7),
                    borderRadius:const BorderRadius.only(
                      topRight: Radius.circular(35),
                      topLeft: Radius.circular(35),
                    )

                  ),
                  child: child,
                ),
              ),
            )
Comment

how to blur Container in flutter

Container(
    color: Colors.black.withOpacity(0.8),
  ),
Comment

PREVIOUS NEXT
Code Example
Dart :: flutter images 
Dart :: ElevatedButton background flutter 
Dart :: dart try catch 
Dart :: flutter pretext on textfield 
Dart :: images with text in it flutter 
Dart :: dart function as variable 
Dart :: text position in flutter 
Dart :: DioError (DioError [DioErrorType.DEFAULT]: Converting object to an encodable object failed: Instance of 
Dart :: convert iso date string into date and time string flutter 
Dart :: dart string to hex 
Dart :: dart list sort by value with custom class 
Dart :: flutter future return error 
Dart :: flutter clipoval 
Dart :: flutter image size not working 
Dart :: toast message in flutter 
Dart :: aws ec2 upload file 
Dart :: flutter localstorage clear 
Dart :: flutter scroll to end of list 
Dart :: column remove space between flutter 
Dart :: pub http 
Dart :: flutter copy 
Dart :: Flutter: How do you make a card clickable? 
Dart :: heart shape container flutter 
Dart :: increase widh of TableCell in flutter 
Dart :: @override in dart 
Dart :: path dart 
Dart :: flutter multi icon button 
Dart :: single clone data in flutter 
Dart :: create array in flutter 
Dart :: flutter column stackov 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =