Created
January 20, 2022 21:18
-
-
Save jmagman/cf862008860e18135d5011e58dfaf49f to your computer and use it in GitHub Desktop.
Cupertino Icons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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