Created with <3 with dartpad.dev.
Created
July 27, 2022 09:54
-
-
Save Chralu/813672147c883e15847680c9a0f3237f to your computer and use it in GitHub Desktop.
Flutter101 - Styled container
This file contains 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'; | |
class StyledContainer extends StatelessWidget { | |
const StyledContainer({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
// Ce Container aura : | |
// - une couleur de fond Ambre | |
// - des coins arrondis avec un rayon de 20 points | |
decoration: BoxDecoration( | |
color: Colors.amber, | |
borderRadius: BorderRadius.circular(20), | |
), | |
); | |
} | |
} | |
void main() { | |
runApp( | |
const StyledContainer(), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment