Skip to content

Instantly share code, notes, and snippets.

@Chralu
Created July 27, 2022 09:54
Show Gist options
  • Save Chralu/813672147c883e15847680c9a0f3237f to your computer and use it in GitHub Desktop.
Save Chralu/813672147c883e15847680c9a0f3237f to your computer and use it in GitHub Desktop.
Flutter101 - Styled container

Flutter101 - Styled container

Created with <3 with dartpad.dev.

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