Skip to content

Instantly share code, notes, and snippets.

@LOG-TAG
Last active November 24, 2020 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LOG-TAG/fd459342f7d992ec1141713ab30a2af1 to your computer and use it in GitHub Desktop.
Save LOG-TAG/fd459342f7d992ec1141713ab30a2af1 to your computer and use it in GitHub Desktop.
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