Skip to content

Instantly share code, notes, and snippets.

@jmagman
Created January 20, 2022 21:18
Show Gist options
  • Save jmagman/cf862008860e18135d5011e58dfaf49f to your computer and use it in GitHub Desktop.
Save jmagman/cf862008860e18135d5011e58dfaf49f to your computer and use it in GitHub Desktop.
Cupertino Icons
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ConstrainedBox(
key: UniqueKey(),
constraints: BoxConstraints.tight(const Size(200.0, 100.0)),
child: Container(
padding: const EdgeInsets.all(5.0),
color: Colors.white,
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: const <Widget>[
Icon(
CupertinoIcons.heart_fill,
color: Colors.pink,
size: 24.0,
),
Icon(
CupertinoIcons.bell_fill,
color: Colors.green,
size: 30.0,
),
Icon(
CupertinoIcons.umbrella_fill,
color: Colors.blue,
size: 36.0,
),
],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment