Skip to content

Instantly share code, notes, and snippets.

@LOG-TAG

LOG-TAG/main.dart

Last active Nov 24, 2020
Embed
What would you like to do?
chip
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatefulWidget {
@override
_MyWidgetState createState() => _MyWidgetState();
}
class _MyWidgetState extends State<MyWidget> {
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Transform(
transform: new Matrix4.identity()..scale(2.0),
child: new Chip(
label: Text('VIP', style: TextStyle(color: Colors.blue)),
padding: const EdgeInsets.only(left: 20, right: 20),
shape: StadiumBorder(
side: BorderSide(color: Colors.redAccent, width: 2.0)),
)),
],
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment