main.dart
import 'package:flutter/material.dart';
void main() => runApp(const FlutterExample());
class FlutterExample extends StatelessWidget {
const FlutterExample({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Example',
theme: ThemeData(primarySwatch: Colors.deepOrange),
home: const StateExample()
);
}
}
class StateExample extends StatefulWidget {
const StateExample({Key? key}) : super(key: key);
@override
_StateExampleState createState() => _StateExampleState();
}
class _StateExampleState extends State<StateExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFF5F5F5),
appBar: AppBar(
title: const Text("Flutter - ActionChip Size")
),
body: bodyContent()
);
}
bodyContent(){
return Center(
child: Transform(
transform: Matrix4.identity()..scale(1.5),
child: ActionChip(
avatar: CircleAvatar(
backgroundColor: Colors.blue[100],
child: const Icon(
Icons.share,
color: Colors.blue,
),
),
label: const Text("Share Now"),
onPressed: (){ },
backgroundColor: Colors.blue[200],
),
)
);
}
}
![](https://fluttertuts.wordpress.com/wp-content/uploads/2021/07/3849b-flutteractionchipsizeexample.png)
More flutter tutorials
- flutter – ActionChip example
- flutter – Chip example
- flutter – Container circle border
- flutter – Container gradient border
- flutter – Stateful widget example
- flutter – Button border example
- flutter – Floating action button shape
- flutter – TextField border radius
- flutter – TextField border padding
- flutter – TextField hint text color
- flutter – TextField decoration
- flutter – TextField get text
- flutter – Remove debug banner
- flutter – SnackBar dismiss
- flutter – Fade in fade out animation