Skip to content

Elevation of Banner widget is hard code #148928

@Trung15010802

Description

@Trung15010802

Use case

I want to change the elevation or shadow of Banner widget

Proposal

Code sample, can't change the elevation

import 'package:flutter/material.dart';

//Material design library
void main() {
runApp(
	//widget tree starts here
	MaterialApp(
	home: Scaffold(
		appBar: AppBar(
		title: const Text('GeeksforGeeks'),
		backgroundColor: Colors.greenAccent[400],
		centerTitle: true,
		), //AppBar
		body: Center(
		child: Container(
			margin: const EdgeInsets.all(10.0),
			child: ClipRect(
			/** Banner Widget **/
			child: Banner(
				message: "20% off !!",
				location: BannerLocation.bottomStart,
				color: Colors.red,
				child: Container(
				color: Colors.green[100],
				height: 300,
				child: Padding(
					padding: const EdgeInsets.fromLTRB(10, 20, 10, 20),
					child: Column(
					children: <Widget>[
						Image.network(
							'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190806131525/forkPython.jpg'), //Image.network
						const SizedBox(height: 10),
						const Text(
						'GeeksforGeeks',
						style: TextStyle(
							color: Colors.green,
							fontSize: 40,
							fontWeight: FontWeight.bold), //TextStyle
						),
						const SizedBox(
						height: 5,
						), //SizedBox
						const Text(
						'Fork Python Course',
						style: TextStyle(
							color: Colors.green,
							fontSize: 20,
							fontWeight: FontWeight.bold), //TextStyle
						), //Text
						const SizedBox(height: 20),

						// RaiseButton is deprecated and should not be used. Use ElevatedButton instead.

						// RaisedButton(
						// color: Colors.greenAccent[400],
						// onPressed: () {},
						// child: const Text('Register'),
						// ) //RaisedButton
					], //<Widget>[]
					), //Column
				), //Padding
				), //Container
			), //Banner
			), //ClipRect
		), //container
		), //Center
	), //Scaffold
	), //MaterialApp
);
}

Image:

image

Lack of property:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions