xxxxxxxxxx
ElevatedButton(
onPressed: () {},
child: Text('Button'),
style: ElevatedButton.styleFrom(
shape: CircleBorder(),
padding: EdgeInsets.all(24),
),
)
xxxxxxxxxx
RaisedButton(
onPressed: () {},
color: Colors.amber,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
child: Text("Click This"),
)
xxxxxxxxxx
ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0),
),
),
child: Text(
"Click ME!!"
),
)
xxxxxxxxxx
ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
padding: EdgeInsets.symmetric(horizontal: 40.0, vertical: 20.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)
),
primary: Colors.purple
),
child: Text(
"CLICK ME",
style: TextStyle(color: Colors.white, fontSize: 18),
),
)
xxxxxxxxxx
// 1
ElevatedButton(
child: const Text(
'Button',
style: TextStyle(fontSize: 24),
),
onPressed: () {},
style: ElevatedButton.styleFrom(
fixedSize: const Size(200, 200)
shape: const CircleBorder(),
),
),
// 2
MaterialButton(
color: Colors.blue,
shape: const CircleBorder(),
onPressed: () {},
child: const Padding(
padding: EdgeInsets.all(100),
child: Text(
'A circle button',
style: TextStyle(color: Colors.white, fontSize: 24),
),
),
),
// 3
GestureDetector(
onTap: () {
print('Button tapped');
},
child: const CircleAvatar(
radius: 100,
backgroundColor: Colors.indigo,
child: Text(
'A Button',
style: TextStyle(fontSize: 30),
),
)),
// 4
ElevatedButton(
style: ElevatedButton.styleFrom(
shape: const CircleBorder(), primary: Colors.red),
child: Container(
width: 200,
height: 200,
alignment: Alignment.center,
decoration: const BoxDecoration(shape: BoxShape.circle),
child: const Text(
'I am a button',
style: TextStyle(fontSize: 24),
),
),
onPressed: () {},
),
// 5
ClipRRect(
borderRadius: BorderRadius.circular(120),
child: SizedBox(
width: 240,
height: 240,
child: ElevatedButton.icon(
icon: const Icon(
Icons.camera,
size: 40,
),
label: const Text(
'Camera',
style: TextStyle(fontSize: 25),
),
onPressed: () {},
),
),
),
xxxxxxxxxx
Container(
width: 90,
height: 90,
child: RaisedButton(onPressed: (){
},
color: Colors.deepOrange,
textColor: Colors.white,
shape: CircleBorder(side: BorderSide.none),
child: Text('Login',style: TextStyle(
fontSize: 20.0
),
),
),
)
xxxxxxxxxx
ElevatedButton(
onPressed: () {},
child: Text('Button'),
style: ElevatedButton.styleFrom(shape: StadiumBorder()),
)
xxxxxxxxxx
// 1
ElevatedButton(
child: const Text(
'Button',
style: TextStyle(fontSize: 24),
),
onPressed: () {},
style: ElevatedButton.styleFrom(
fixedSize: const Size(200, 200)
shape: const CircleBorder(),
),
),
// 2
MaterialButton(
color: Colors.blue,
shape: const CircleBorder(),
onPressed: () {},
child: const Padding(
padding: EdgeInsets.all(100),
child: Text(
'A circle button',
style: TextStyle(color: Colors.white, fontSize: 24),
),
),
),
// 3
GestureDetector(
onTap: () {
print('Button tapped');
},
child: const CircleAvatar(
radius: 100,
backgroundColor: Colors.indigo,
child: Text(
'A Button',
style: TextStyle(fontSize: 30),
),
)),
// 4
ElevatedButton(
style: ElevatedButton.styleFrom(
shape: const CircleBorder(), primary: Colors.red),
child: Container(
width: 200,
height: 200,
alignment: Alignment.center,
decoration: const BoxDecoration(shape: BoxShape.circle),
child: const Text(
'I am a button',
style: TextStyle(fontSize: 24),
),
),
onPressed: () {},
),
// 5
ClipRRect(
borderRadius: BorderRadius.circular(120),
child: SizedBox(
width: 240,
height: 240,
child: ElevatedButton.icon(
icon: const Icon(
Icons.camera,
size: 40,
),
label: const Text(
'Camera',
style: TextStyle(fontSize: 25),
),
onPressed: () {},
),
),
),
xxxxxxxxxx
ElevatedButton(
onPressed: () {
debugPrint('ElevatedButton Clicked');
},
child: Text('ElevatedButton'),
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
)
xxxxxxxxxx
Padding(
padding: EdgeInsets.only(left: 150.0, right: 0.0),
child: RaisedButton(
textColor: Colors.white,
color: Colors.black,
child: Text("Search"),
onPressed: () {},
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0),
),
),
)