Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/How To Add Elevation To Container Flutter?
Next
Answered
Wren Roberts
  • 16
Wren Roberts
Asked: April 22, 20222022-04-22T02:21:25+00:00 2022-04-22T02:21:25+00:00In: whatever

How To Add Elevation To Container Flutter?

  • 16

. Advertisement .

..3..

. Advertisement .

..4..

I am learning about fluter and I am still confused with elevation to container fluter. I would like to add elevation to container flutter. Do you have any suggestion for this?

♦ Suggestions of ITtutoria Team
Ideas: There are a few ways to add elevation to container flutter to make the effect more dramatic.

  • The first option, one is to use a grid of squares inside the container lid, which creates a more organic looking effect because it has no sharp edges.
  • Another option is to use a dowel rod with an attached weight to create stability as you lower the lid down.
    flutter
    • 5 5 Answers
    • 98 Views
    • 0 Followers
    • 0
    Answer
    Share
    • Facebook
    • Report

    5 Answers

    • Voted
    • Oldest
    • Recent
    • Random
    1. Best Answer
      Imani O'Sullivan
      2022-04-22T02:21:31+00:00Added an answer on April 22, 2022 at 2:21 am

      I have the simple method to fix your problem, here you are:

      import "package:flutter/material.dart";
      ​
      void main() => runApp(MyApp());
      ​
      class MyApp extends StatelessWidget {
        Widget build(BuildContext context) {
          return MaterialApp(
            home: HomePage(),
          );
        }
      }
      ​
      class HomePage extends StatelessWidget {
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            body: Center(
              child: Padding(
                padding: const EdgeInsets.all(30.0),
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(5.0),
                  child: Container(
                    height: 100.0,
                    margin: const EdgeInsets.only(bottom: 6.0), //Same as `blurRadius` i guess
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(5.0),
                      color: Colors.white,
                      boxShadow: [
                        BoxShadow(
                          color: Colors.grey,
                          offset: Offset(0.0, 1.0), //(x,y)
                          blurRadius: 6.0,
                        ),
                      ],
                    ),
                  ),
                ),
              ),
            ),
          );
        }
      }
      • 8
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report
    2. Evan Taylor
      2022-04-22T02:21:40+00:00Added an answer on April 22, 2022 at 2:21 am

      I hope this helps

      decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(5.0),
                      color: Colors.white,
                      boxShadow: [
                        BoxShadow(
                          color: Colors.grey,
                          offset: Offset(0.0, 1.0), //(x,y)
                          blurRadius: 6.0,
                        ),
                      ],
                    ),
      • 21
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report
    3. Kayla Smith
      2022-04-22T02:21:37+00:00Added an answer on April 22, 2022 at 2:21 am

      You could consider my suggestion here

      return Material(
             elevation: 20,
             child Container(),
             );
      • 23
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report
    4. Sharon O'Neill
      2022-04-22T02:21:34+00:00Added an answer on April 22, 2022 at 2:21 am
      body: Container(
          margin: EdgeInsets.all(8),
          decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(8.0),
              color: Colors.white,
              boxShadow: [
                  BoxShadow(
                      color: Colors.black,
                      blurRadius: 2.0,
                      spreadRadius: 0.0,
                      offset: Offset(2.0, 2.0), // shadow direction: bottom right
                  )
              ],
          ),
          child: Container(width: 100, height: 50) // child widget, replace with your own
      ),
      • 22
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report
    5. June Murphy
      2022-04-22T02:21:28+00:00Added an answer on April 22, 2022 at 2:21 am

      You could consider my suggestion here

      Container(
        decoration: BoxDecoration(
          boxShadow: [
            BoxShadow(
              color: Colors.grey.withOpacity(0.8),
              spreadRadius: 10,
              blurRadius: 5,
              offset: Offset(0, 7), // changes position of shadow
            ),
          ],
        ),
        child: Image.asset(chocolateImage),
      )
      • 12
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Ask A Question
    • How to Split String by space in C++
    • How To Convert A Pandas DataFrame Column To A List
    • How to Replace Multiple Characters in A String in Python?
    • How To Remove Special Characters From String Python

    Explore

    • Home
    • Tutorial

    Footer

    ITtutoria

    ITtutoria

    This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

    @ ITTutoria Co Ltd.

    Tutorial

    • Home
    • Python
    • Science
    • Java
    • JavaScript
    • Reactjs
    • Nodejs
    • Tools
    • QA

    Legal Stuff

    • About Us
    • Terms of Use
    • Privacy Policy
    • Contact Us

    DMCA.com Protection Status

    Help

    • Knowledge Base
    • Support

    Follow

    © 2022 Ittutoria. All Rights Reserved.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.