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 add blur effect to photo at flutter

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Container(
        decoration: new BoxDecoration(
          image: new DecorationImage(
            image: new ExactAssetImage('assets/dog.png'),
            fit: BoxFit.cover,
          ),
        ),
        child: new BackdropFilter(
          filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
          child: new Container(
            decoration: new BoxDecoration(color: Colors.white.withOpacity(0.0)),
          ),
        ),
      ),
    );
  }
}
Comment

PREVIOUS NEXT
Code Example
Dart :: aws ec2 upload file 
Dart :: flutter create new map 
Dart :: snackbar in flutter 
Dart :: define offset for floatingActionButtonLocation flutter 
Dart :: perform async task when build is done flutter 
Dart :: message yes or not in dart 
Dart :: dart compute example 
Dart :: alertdialog padding flutter 
Dart :: flutter add icon 
Dart :: array 2d dart 
Dart :: dart ?? operator 
Dart :: dart create hash 
Dart :: flutter snackbar top 
Dart :: loop map flutter 
Dart :: flutter Scaffold.of() called with a context that does not contain a Scaffold 
Dart :: concat array dart 
Dart :: flutter container with custom shape 
Dart :: change color of container on tap flutter 
Dart :: remove .0 flutter 
Dart :: flutter unhandled exception 
Dart :: tooltip flutter 
Dart :: Add glow or shadow to flutter widget 
Dart :: dart language asynchronous ?? 
Dart :: how to center widgets in using scrollview flutter 
Dart :: flutter column stackov 
Dart :: flutter contaienr 
Swift :: firebase crashlytics dsym missing 
Swift :: get length of array swift 
Swift :: declaration of empty dictionary in swift language 
Swift :: how to find uibutton title text 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =